diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 04:38:52 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 04:38:52 +0000 |
commit | 4df3ac66b2c5e1c1d04bd944424e7bace6f58bf6 (patch) | |
tree | ba7ab737cad378650154571bd472f25277d089d8 /chrome | |
parent | 3562f1b7d9d71ff68d4d0936112daa1ea1fa7268 (diff) | |
download | chromium_src-4df3ac66b2c5e1c1d04bd944424e7bace6f58bf6.zip chromium_src-4df3ac66b2c5e1c1d04bd944424e7bace6f58bf6.tar.gz chromium_src-4df3ac66b2c5e1c1d04bd944424e7bace6f58bf6.tar.bz2 |
Coverity: Pass values by reference.
CID=8402,8494,8641,8716,8717,8740,9100
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6676015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/extensions/image_loading_tracker.cc | 2 | ||||
-rw-r--r-- | chrome/browser/memory_details.h | 2 | ||||
-rw-r--r-- | chrome/browser/memory_details_linux.cc | 2 | ||||
-rw-r--r-- | chrome/browser/memory_details_mac.cc | 2 | ||||
-rw-r--r-- | chrome/browser/memory_details_win.cc | 2 | ||||
-rw-r--r-- | chrome/browser/net/url_info.cc | 8 | ||||
-rw-r--r-- | chrome/browser/net/url_info.h | 4 | ||||
-rw-r--r-- | chrome/browser/password_manager/password_store.cc | 4 | ||||
-rw-r--r-- | chrome/browser/password_manager/password_store.h | 4 | ||||
-rw-r--r-- | chrome/browser/ui/gtk/location_bar_view_gtk.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/gtk/location_bar_view_gtk.h | 2 |
11 files changed, 17 insertions, 17 deletions
diff --git a/chrome/browser/extensions/image_loading_tracker.cc b/chrome/browser/extensions/image_loading_tracker.cc index 68fbe13..3b93ce2 100644 --- a/chrome/browser/extensions/image_loading_tracker.cc +++ b/chrome/browser/extensions/image_loading_tracker.cc @@ -47,7 +47,7 @@ class ImageLoadingTracker::ImageLoader max_size, id)); } - void LoadOnFileThread(ExtensionResource resource, + void LoadOnFileThread(const ExtensionResource& resource, const gfx::Size& max_size, int id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); diff --git a/chrome/browser/memory_details.h b/chrome/browser/memory_details.h index 81d5796..2cc5e26 100644 --- a/chrome/browser/memory_details.h +++ b/chrome/browser/memory_details.h @@ -122,7 +122,7 @@ class MemoryDetails : public base::RefCountedThreadSafe<MemoryDetails> { // Note - this function enumerates memory details from many processes // and is fairly expensive to run, hence it's run on the file thread. // The parameter holds information about processes from the IO thread. - void CollectProcessData(std::vector<ProcessMemoryInformation>); + void CollectProcessData(const std::vector<ProcessMemoryInformation>&); #if defined(OS_MACOSX) // A helper for |CollectProcessData()|, collecting data on the Chrome/Chromium diff --git a/chrome/browser/memory_details_linux.cc b/chrome/browser/memory_details_linux.cc index 9c67966..96d80f1 100644 --- a/chrome/browser/memory_details_linux.cc +++ b/chrome/browser/memory_details_linux.cc @@ -200,7 +200,7 @@ static void GetAllChildren(const std::vector<Process>& processes, } void MemoryDetails::CollectProcessData( - std::vector<ProcessMemoryInformation> child_info) { + const std::vector<ProcessMemoryInformation>& child_info) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); std::vector<Process> processes; diff --git a/chrome/browser/memory_details_mac.cc b/chrome/browser/memory_details_mac.cc index 8b33825..c03c8c9 100644 --- a/chrome/browser/memory_details_mac.cc +++ b/chrome/browser/memory_details_mac.cc @@ -84,7 +84,7 @@ ProcessData* MemoryDetails::ChromeBrowser() { } void MemoryDetails::CollectProcessData( - std::vector<ProcessMemoryInformation> child_info) { + const std::vector<ProcessMemoryInformation>& child_info) { // This must be run on the file thread to avoid jank (|ProcessInfoSnapshot| // runs /bin/ps, which isn't instantaneous). DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); diff --git a/chrome/browser/memory_details_win.cc b/chrome/browser/memory_details_win.cc index c8e5b15..c954a8e 100644 --- a/chrome/browser/memory_details_win.cc +++ b/chrome/browser/memory_details_win.cc @@ -65,7 +65,7 @@ ProcessData* MemoryDetails::ChromeBrowser() { } void MemoryDetails::CollectProcessData( - std::vector<ProcessMemoryInformation> child_info) { + const std::vector<ProcessMemoryInformation>& child_info) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); // Clear old data. diff --git a/chrome/browser/net/url_info.cc b/chrome/browser/net/url_info.cc index 8418b12..cc02165 100644 --- a/chrome/browser/net/url_info.cc +++ b/chrome/browser/net/url_info.cc @@ -259,10 +259,10 @@ static std::string HoursMinutesSeconds(int seconds) { } // static -void UrlInfo::GetHtmlTable(const UrlInfoTable host_infos, - const char* description, - const bool brief, - std::string* output) { +void UrlInfo::GetHtmlTable(const UrlInfoTable& host_infos, + const char* description, + bool brief, + std::string* output) { if (0 == host_infos.size()) return; output->append(description); diff --git a/chrome/browser/net/url_info.h b/chrome/browser/net/url_info.h index 378edbf..e6dc70a 100644 --- a/chrome/browser/net/url_info.h +++ b/chrome/browser/net/url_info.h @@ -123,9 +123,9 @@ class UrlInfo { void DLogResultsStats(const char* message) const; - static void GetHtmlTable(const UrlInfoTable host_infos, + static void GetHtmlTable(const UrlInfoTable& host_infos, const char* description, - const bool brief, + bool brief, std::string* output); // For testing, and use in printing tables of info, we sometimes need to diff --git a/chrome/browser/password_manager/password_store.cc b/chrome/browser/password_manager/password_store.cc index af0306c..712ef1c 100644 --- a/chrome/browser/password_manager/password_store.cc +++ b/chrome/browser/password_manager/password_store.cc @@ -77,7 +77,7 @@ int PasswordStore::GetBlacklistLogins(PasswordStoreConsumer* consumer) { } void PasswordStore::NotifyConsumer(GetLoginsRequest* request, - const vector<PasswordForm*> forms) { + const vector<PasswordForm*>& forms) { scoped_ptr<GetLoginsRequest> request_ptr(request); #if !defined(OS_MACOSX) @@ -91,7 +91,7 @@ void PasswordStore::NotifyConsumer(GetLoginsRequest* request, void PasswordStore::NotifyConsumerImpl(PasswordStoreConsumer* consumer, int handle, - const vector<PasswordForm*> forms) { + const vector<PasswordForm*>& forms) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // Don't notify the consumer if the request was canceled. if (pending_requests_.find(handle) == pending_requests_.end()) { diff --git a/chrome/browser/password_manager/password_store.h b/chrome/browser/password_manager/password_store.h index 1ac6f8b..32f9c81 100644 --- a/chrome/browser/password_manager/password_store.h +++ b/chrome/browser/password_manager/password_store.h @@ -140,7 +140,7 @@ class PasswordStore : public base::RefCountedThreadSafe<PasswordStore> { // Notifies the consumer that a Get*Logins() request is complete. virtual void NotifyConsumer( GetLoginsRequest* request, - const std::vector<webkit_glue::PasswordForm*> forms); + const std::vector<webkit_glue::PasswordForm*>& forms); private: // Called by NotifyConsumer, but runs in the consumer's thread. Will not @@ -148,7 +148,7 @@ class PasswordStore : public base::RefCountedThreadSafe<PasswordStore> { // that PasswordStoreConsumer doesn't have to be reference counted (we assume // consumers will cancel their requests before they are destroyed). void NotifyConsumerImpl(PasswordStoreConsumer* consumer, int handle, - const std::vector<webkit_glue::PasswordForm*> forms); + const std::vector<webkit_glue::PasswordForm*>& forms); // Returns a new request handle tracked in pending_requests_. int GetNewRequestHandle(); diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc index d742338..e314fe3 100644 --- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc +++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc @@ -1475,7 +1475,7 @@ LocationBarViewGtk::PageActionViewGtk::~PageActionViewGtk() { } void LocationBarViewGtk::PageActionViewGtk::UpdateVisibility( - TabContents* contents, GURL url) { + TabContents* contents, const GURL& url) { // Save this off so we can pass it back to the extension when the action gets // executed. See PageActionImageView::OnMousePressed. current_tab_id_ = contents ? ExtensionTabUtil::GetTabId(contents) : -1; diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h index 53dd180..a5b38cd 100644 --- a/chrome/browser/ui/gtk/location_bar_view_gtk.h +++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h @@ -228,7 +228,7 @@ class LocationBarViewGtk : public AutocompleteEditController, // Called to notify the PageAction that it should determine whether to be // visible or hidden. |contents| is the TabContents that is active, |url| // is the current page URL. - void UpdateVisibility(TabContents* contents, GURL url); + void UpdateVisibility(TabContents* contents, const GURL& url); // A callback from ImageLoadingTracker for when the image has loaded. virtual void OnImageLoaded( |