summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 04:37:14 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 04:37:14 +0000
commit3562f1b7d9d71ff68d4d0936112daa1ea1fa7268 (patch)
treea118bc1dbe4ef0050791fbe204ca364c484e8020
parent62532e803f8090a4745cbf119d57e83510e88c1f (diff)
downloadchromium_src-3562f1b7d9d71ff68d4d0936112daa1ea1fa7268.zip
chromium_src-3562f1b7d9d71ff68d4d0936112daa1ea1fa7268.tar.gz
chromium_src-3562f1b7d9d71ff68d4d0936112daa1ea1fa7268.tar.bz2
Coverity: Pass parameters by ref.
CID=14063,14197,14317,14659,14898,14958,14983,15408,15410,15411 BUG=none TEST=none Review URL: http://codereview.chromium.org/6677010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77787 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/safe_browsing/malware_details.cc2
-rw-r--r--chrome/browser/safe_browsing/malware_details.h2
-rw-r--r--chrome/browser/service/service_process_control.cc2
-rw-r--r--chrome/browser/service/service_process_control.h2
-rw-r--r--chrome/browser/sync/notifier/server_notifier_thread.cc3
-rw-r--r--chrome/browser/sync/notifier/server_notifier_thread.h2
-rw-r--r--chrome/browser/sync/sessions/sync_session.cc2
-rw-r--r--chrome/browser/sync/sessions/sync_session.h2
-rw-r--r--chrome/browser/ui/browser_dialogs.h2
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm2
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc2
-rw-r--r--chrome/browser/ui/views/extensions/extension_installed_bubble.cc2
-rw-r--r--chrome/browser/ui/webui/extension_icon_source.cc2
-rw-r--r--chrome/browser/ui/webui/extension_icon_source.h2
-rw-r--r--chrome/renderer/p2p/socket_dispatcher.cc4
-rw-r--r--chrome/renderer/p2p/socket_dispatcher.h4
17 files changed, 20 insertions, 19 deletions
diff --git a/chrome/browser/safe_browsing/malware_details.cc b/chrome/browser/safe_browsing/malware_details.cc
index da6c848..f291284 100644
--- a/chrome/browser/safe_browsing/malware_details.cc
+++ b/chrome/browser/safe_browsing/malware_details.cc
@@ -62,7 +62,7 @@ MalwareDetails* MalwareDetails::NewMalwareDetails(
// Create a MalwareDetails for the given tab. Runs in the UI thread.
MalwareDetails::MalwareDetails(
TabContents* tab_contents,
- const SafeBrowsingService::UnsafeResource resource)
+ const SafeBrowsingService::UnsafeResource& resource)
: TabContentsObserver(tab_contents),
resource_(resource) {
StartCollection();
diff --git a/chrome/browser/safe_browsing/malware_details.h b/chrome/browser/safe_browsing/malware_details.h
index efb3eef..815f45b 100644
--- a/chrome/browser/safe_browsing/malware_details.h
+++ b/chrome/browser/safe_browsing/malware_details.h
@@ -53,7 +53,7 @@ class MalwareDetails : public base::RefCountedThreadSafe<MalwareDetails>,
friend class MalwareDetailsFactoryImpl;
MalwareDetails(TabContents* tab_contents,
- const SafeBrowsingService::UnsafeResource resource);
+ const SafeBrowsingService::UnsafeResource& resource);
// Called on the IO thread with the DOM details.
virtual void AddDOMDetails(
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc
index bc9f344..531a95f 100644
--- a/chrome/browser/service/service_process_control.cc
+++ b/chrome/browser/service/service_process_control.cc
@@ -240,7 +240,7 @@ void ServiceProcessControl::OnCloudPrintProxyIsEnabled(bool enabled,
}
void ServiceProcessControl::OnRemotingHostInfo(
- remoting::ChromotingHostInfo host_info) {
+ const remoting::ChromotingHostInfo& host_info) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
for (std::set<MessageHandler*>::iterator it = message_handlers_.begin();
it != message_handlers_.end(); ++it) {
diff --git a/chrome/browser/service/service_process_control.h b/chrome/browser/service/service_process_control.h
index dbf1eb0..0b796fd 100644
--- a/chrome/browser/service/service_process_control.h
+++ b/chrome/browser/service/service_process_control.h
@@ -95,7 +95,7 @@ class ServiceProcessControl : public IPC::Channel::Sender,
// Message handlers
void OnCloudPrintProxyIsEnabled(bool enabled, std::string email);
- void OnRemotingHostInfo(remoting::ChromotingHostInfo host_info);
+ void OnRemotingHostInfo(const remoting::ChromotingHostInfo& host_info);
// Send a shutdown message to the service process. IPC channel will be
// destroyed after calling this method.
diff --git a/chrome/browser/sync/notifier/server_notifier_thread.cc b/chrome/browser/sync/notifier/server_notifier_thread.cc
index 9dd62bf..8a8e825 100644
--- a/chrome/browser/sync/notifier/server_notifier_thread.cc
+++ b/chrome/browser/sync/notifier/server_notifier_thread.cc
@@ -167,7 +167,8 @@ void ServerNotifierThread::StopInvalidationListener() {
chrome_invalidation_client_.reset();
}
-void ServerNotifierThread::SetRegisteredTypes(syncable::ModelTypeSet types) {
+void ServerNotifierThread::SetRegisteredTypes(
+ const syncable::ModelTypeSet& types) {
registered_types_ = types;
}
diff --git a/chrome/browser/sync/notifier/server_notifier_thread.h b/chrome/browser/sync/notifier/server_notifier_thread.h
index 4800735..aa8ca2d 100644
--- a/chrome/browser/sync/notifier/server_notifier_thread.h
+++ b/chrome/browser/sync/notifier/server_notifier_thread.h
@@ -96,7 +96,7 @@ class ServerNotifierThread
syncable::ModelTypeSet registered_types_;
- void SetRegisteredTypes(syncable::ModelTypeSet types);
+ void SetRegisteredTypes(const syncable::ModelTypeSet& types);
};
} // namespace sync_notifier
diff --git a/chrome/browser/sync/sessions/sync_session.cc b/chrome/browser/sync/sessions/sync_session.cc
index 52a44fa..cd01375 100644
--- a/chrome/browser/sync/sessions/sync_session.cc
+++ b/chrome/browser/sync/sessions/sync_session.cc
@@ -10,7 +10,7 @@ namespace browser_sync {
namespace sessions {
SyncSession::SyncSession(SyncSessionContext* context, Delegate* delegate,
- SyncSourceInfo source,
+ const SyncSourceInfo& source,
const ModelSafeRoutingInfo& routing_info,
const std::vector<ModelSafeWorker*>& workers)
: context_(context),
diff --git a/chrome/browser/sync/sessions/sync_session.h b/chrome/browser/sync/sessions/sync_session.h
index 693d652..9e532d77 100644
--- a/chrome/browser/sync/sessions/sync_session.h
+++ b/chrome/browser/sync/sessions/sync_session.h
@@ -82,7 +82,7 @@ class SyncSession {
SyncSession(SyncSessionContext* context,
Delegate* delegate,
- SyncSourceInfo source,
+ const SyncSourceInfo& source,
const ModelSafeRoutingInfo& routing_info,
const std::vector<ModelSafeWorker*>& workers);
~SyncSession();
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h
index 24e139d..4ee597b 100644
--- a/chrome/browser/ui/browser_dialogs.h
+++ b/chrome/browser/ui/browser_dialogs.h
@@ -50,7 +50,7 @@ void ShowImportLockDialog(gfx::NativeWindow parent,
// icon of the extension.
void ShowExtensionInstalledBubble(const Extension* extension,
Browser* browser,
- SkBitmap icon,
+ const SkBitmap& icon,
Profile* profile);
// Shows or hide the hung renderer dialog for the given TabContents.
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm
index c6a8143..c0df556 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_bridge.mm
@@ -46,7 +46,7 @@ namespace browser {
void ShowExtensionInstalledBubble(
const Extension* extension,
Browser* browser,
- SkBitmap icon,
+ const SkBitmap& icon,
Profile* profile) {
if ((extension->browser_action()) || !extension->omnibox_keyword().empty() ||
(extension->page_action() &&
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
index 114a867..00c7482 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc
@@ -107,7 +107,7 @@ void SetToolBarStyle() {
"widget \"*chrome-bookmark-toolbar\" style \"chrome-bookmark-toolbar\"");
}
-void RecordAppLaunch(Profile* profile, GURL url) {
+void RecordAppLaunch(Profile* profile, const GURL& url) {
DCHECK(profile->GetExtensionService());
if (!profile->GetExtensionService()->IsInstalledApp(url))
return;
diff --git a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
index 74aae6c..056bf7d 100644
--- a/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/extensions/extension_installed_bubble_gtk.cc
@@ -52,7 +52,7 @@ namespace browser {
void ShowExtensionInstalledBubble(
const Extension* extension,
Browser* browser,
- SkBitmap icon,
+ const SkBitmap& icon,
Profile* profile) {
ExtensionInstalledBubbleGtk::Show(extension, browser, icon);
}
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
index 303e8cd..29475c4 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
@@ -67,7 +67,7 @@ namespace browser {
void ShowExtensionInstalledBubble(
const Extension* extension,
Browser* browser,
- SkBitmap icon,
+ const SkBitmap& icon,
Profile* profile) {
ExtensionInstalledBubble::Show(extension, browser, icon);
}
diff --git a/chrome/browser/ui/webui/extension_icon_source.cc b/chrome/browser/ui/webui/extension_icon_source.cc
index fa1902f..eb235c76 100644
--- a/chrome/browser/ui/webui/extension_icon_source.cc
+++ b/chrome/browser/ui/webui/extension_icon_source.cc
@@ -180,7 +180,7 @@ void ExtensionIconSource::LoadDefaultImage(int request_id) {
FinalizeImage(decoded, request_id);
}
-void ExtensionIconSource::LoadExtensionImage(ExtensionResource icon,
+void ExtensionIconSource::LoadExtensionImage(const ExtensionResource& icon,
int request_id) {
ExtensionIconRequest* request = GetData(request_id);
tracker_map_[next_tracker_id_++] = request_id;
diff --git a/chrome/browser/ui/webui/extension_icon_source.h b/chrome/browser/ui/webui/extension_icon_source.h
index ce21865..7b2bc85 100644
--- a/chrome/browser/ui/webui/extension_icon_source.h
+++ b/chrome/browser/ui/webui/extension_icon_source.h
@@ -92,7 +92,7 @@ class ExtensionIconSource : public ChromeURLDataManager::DataSource,
// Loads the extension's |icon| for the given |request_id| and returns the
// image to the client.
- void LoadExtensionImage(ExtensionResource icon, int request_id);
+ void LoadExtensionImage(const ExtensionResource& icon, int request_id);
// Loads the favicon image for the app associated with the |request_id|. If
// the image does not exist, we fall back to the default image.
diff --git a/chrome/renderer/p2p/socket_dispatcher.cc b/chrome/renderer/p2p/socket_dispatcher.cc
index 46651fe..6096f6c 100644
--- a/chrome/renderer/p2p/socket_dispatcher.cc
+++ b/chrome/renderer/p2p/socket_dispatcher.cc
@@ -50,7 +50,7 @@ base::MessageLoopProxy* P2PSocketDispatcher::message_loop() {
}
void P2PSocketDispatcher::OnSocketCreated(
- int socket_id, P2PSocketAddress address) {
+ int socket_id, const P2PSocketAddress& address) {
P2PSocketClient* client = GetClient(socket_id);
if (client) {
client->OnSocketCreated(address);
@@ -65,7 +65,7 @@ void P2PSocketDispatcher::OnError(int socket_id) {
}
void P2PSocketDispatcher::OnDataReceived(
- int socket_id, P2PSocketAddress address,
+ int socket_id, const P2PSocketAddress& address,
const std::vector<char>& data) {
P2PSocketClient* client = GetClient(socket_id);
if (client) {
diff --git a/chrome/renderer/p2p/socket_dispatcher.h b/chrome/renderer/p2p/socket_dispatcher.h
index d837334..9f39387 100644
--- a/chrome/renderer/p2p/socket_dispatcher.h
+++ b/chrome/renderer/p2p/socket_dispatcher.h
@@ -54,9 +54,9 @@ class P2PSocketDispatcher : public RenderViewObserver {
base::MessageLoopProxy* message_loop();
// Incoming message handlers.
- void OnSocketCreated(int socket_id, P2PSocketAddress address);
+ void OnSocketCreated(int socket_id, const P2PSocketAddress& address);
void OnError(int socket_id);
- void OnDataReceived(int socket_id, P2PSocketAddress address,
+ void OnDataReceived(int socket_id, const P2PSocketAddress& address,
const std::vector<char>& data);
P2PSocketClient* GetClient(int socket_id);