summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 18:10:00 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 18:10:00 +0000
commita3caa82f2d87ae876570d1fb9dd220c1e90104d4 (patch)
tree049c32974d5feb71d4e00e2031ddc3fc859da728 /chrome/browser/renderer_host
parentd5bdce9f860bb4d87b5d51d1d202c59ec8b851b4 (diff)
downloadchromium_src-a3caa82f2d87ae876570d1fb9dd220c1e90104d4.zip
chromium_src-a3caa82f2d87ae876570d1fb9dd220c1e90104d4.tar.gz
chromium_src-a3caa82f2d87ae876570d1fb9dd220c1e90104d4.tar.bz2
Coverity: Fix several pass-by-values.
CID=12543,12544,12758,12878,12879,12918,13252,13285,13301,13391 BUG=none TEST=none Review URL: http://codereview.chromium.org/4040003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc10
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h2
-rw-r--r--chrome/browser/renderer_host/web_cache_manager.cc4
-rw-r--r--chrome/browser/renderer_host/web_cache_manager.h4
4 files changed, 11 insertions, 9 deletions
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index c201a89..17b2d91 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -779,16 +779,18 @@ void ResourceMessageFilter::OnGetPluginInfoOnFileThread(
}
void ResourceMessageFilter::OnGotPluginInfo(bool found,
- WebPluginInfo info,
+ const WebPluginInfo& info,
const std::string& actual_mime_type,
const GURL& policy_url,
IPC::Message* reply_msg) {
ContentSetting setting = CONTENT_SETTING_DEFAULT;
if (found) {
- info.enabled = info.enabled &&
- plugin_service_->PrivatePluginAllowedForURL(info.path, policy_url);
+ WebPluginInfo info_copy = info;
+ info_copy.enabled = info_copy.enabled &&
+ plugin_service_->PrivatePluginAllowedForURL(info_copy.path, policy_url);
HostContentSettingsMap* map = profile_->GetHostContentSettingsMap();
- scoped_ptr<PluginGroup> group(PluginGroup::CopyOrCreatePluginGroup(info));
+ scoped_ptr<PluginGroup> group(
+ PluginGroup::CopyOrCreatePluginGroup(info_copy));
std::string resource = group->identifier();
setting = map->GetContentSetting(policy_url,
CONTENT_SETTINGS_TYPE_PLUGINS,
diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h
index 399a122..15c97de 100644
--- a/chrome/browser/renderer_host/resource_message_filter.h
+++ b/chrome/browser/renderer_host/resource_message_filter.h
@@ -188,7 +188,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter,
const std::string& mime_type,
IPC::Message* reply_msg);
void OnGotPluginInfo(bool found,
- WebPluginInfo info,
+ const WebPluginInfo& info,
const std::string& actual_mime_type,
const GURL& policy_url,
IPC::Message* reply_msg);
diff --git a/chrome/browser/renderer_host/web_cache_manager.cc b/chrome/browser/renderer_host/web_cache_manager.cc
index 88baa7b..a9262ed 100644
--- a/chrome/browser/renderer_host/web_cache_manager.cc
+++ b/chrome/browser/renderer_host/web_cache_manager.cc
@@ -248,7 +248,7 @@ bool WebCacheManager::AttemptTactic(
return true;
}
-void WebCacheManager::AddToStrategy(std::set<int> renderers,
+void WebCacheManager::AddToStrategy(const std::set<int>& renderers,
AllocationTactic tactic,
size_t extra_bytes_to_allocate,
AllocationStrategy* strategy) {
@@ -304,7 +304,7 @@ void WebCacheManager::EnactStrategy(const AllocationStrategy& strategy) {
}
}
-void WebCacheManager::ClearRendederCache(std::set<int> renderers) {
+void WebCacheManager::ClearRendederCache(const std::set<int>& renderers) {
std::set<int>::const_iterator iter = renderers.begin();
for (; iter != renderers.end(); ++iter) {
RenderProcessHost* host = RenderProcessHost::FromID(*iter);
diff --git a/chrome/browser/renderer_host/web_cache_manager.h b/chrome/browser/renderer_host/web_cache_manager.h
index 248363e..1bd266b 100644
--- a/chrome/browser/renderer_host/web_cache_manager.h
+++ b/chrome/browser/renderer_host/web_cache_manager.h
@@ -162,7 +162,7 @@ class WebCacheManager {
// For each renderer in |renderers|, computes its allocation according to
// |tactic| and add the result to |strategy|. Any |extra_bytes_to_allocate|
// is divided evenly among the renderers.
- void AddToStrategy(std::set<int> renderers,
+ void AddToStrategy(const std::set<int>& renderers,
AllocationTactic tactic,
size_t extra_bytes_to_allocate,
AllocationStrategy* strategy);
@@ -172,7 +172,7 @@ class WebCacheManager {
void EnactStrategy(const AllocationStrategy& strategy);
// Inform all |renderers| to clear their cache.
- void ClearRendederCache(std::set<int> renderers);
+ void ClearRendederCache(const std::set<int>& renderers);
// Check to see if any active renderers have fallen inactive.
void FindInactiveRenderers();