commit | 6353cbe0ea8cd363b5bad185028407d05000954c | [log] [tgz] |
---|---|---|
author | rbpotter <rbpotter@chromium.org> | Thu Apr 22 15:48:28 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Apr 22 15:48:28 2021 |
tree | e447a84ba46fa9cb06c257ad374c9d4f9742d619 | |
parent | 4e08f84946416194b3a8e542c3a93da4150d6476 [diff] |
WebUI: Make web_ui() non-const This method is marked as const, but it returns a non-const pointer to an object that owns the WebUIMessageHandler and therefore can modify or even delete the handler, if non-const methods are called on it. In accordance with the guidance at [1], change this method to non-const. Note: Not adding an additional: const WebUI* web_ui() const; method, as a const WebUI* does not seem to be useful; since WebUI is an interface, all of its methods are non-const, and handlers generally call this method in order to do something like GetWebContents(). [1] https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/const.md Bug: None Change-Id: Ia0a48e84eb36919fe2d027b450cccc25417238ee Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2827427 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dpapad <dpapad@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/master@{#875177}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.