diff options
author | lucinka.brozkova@gmail.com <lucinka.brozkova@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 21:46:53 +0000 |
---|---|---|
committer | lucinka.brozkova@gmail.com <lucinka.brozkova@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-25 21:46:53 +0000 |
commit | 5eaf9a2c48469b0c4ccdf62ca8262fbc0180e3b0 (patch) | |
tree | 139247712cfba6ad01f7e35e3ff9203846f6f7d8 /chrome/common/extensions/api | |
parent | 8a120a4e51e8285c79f7c934f7b6a76098c651c4 (diff) | |
download | chromium_src-5eaf9a2c48469b0c4ccdf62ca8262fbc0180e3b0.zip chromium_src-5eaf9a2c48469b0c4ccdf62ca8262fbc0180e3b0.tar.gz chromium_src-5eaf9a2c48469b0c4ccdf62ca8262fbc0180e3b0.tar.bz2 |
Cleanup return values in chrome/common/extensions
This CL turns const by value return values into const by ref.
Replacing const value by a const ref when a member variable is returned
is safe, because the member variable will live at least as long as the
temporary object returned now. It can also be more efficient, because
returning a ref can spare copying.
BUG=393155
Review URL: https://codereview.chromium.org/423483006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/api')
-rw-r--r-- | chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h index 733b2a6..45a570f 100644 --- a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h +++ b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h @@ -48,7 +48,7 @@ class FileBrowserHandler { void ClearPatterns(); // Action icon path. - const std::string icon_path() const { return default_icon_path_; } + const std::string& icon_path() const { return default_icon_path_; } void set_icon_path(const std::string& path) { default_icon_path_ = path; } |