summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host
diff options
context:
space:
mode:
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();