Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: components/web_cache/browser/web_cache_manager.cc

Issue 2766263009: Convert content ConnectionFilter to OnBindInterface (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/web_cache/browser/web_cache_manager.h" 5 #include "components/web_cache/browser/web_cache_manager.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 active_renderers_.insert(renderer_id); 87 active_renderers_.insert(renderer_id);
88 88
89 RendererInfo* stats = &(stats_[renderer_id]); 89 RendererInfo* stats = &(stats_[renderer_id]);
90 memset(stats, 0, sizeof(*stats)); 90 memset(stats, 0, sizeof(*stats));
91 stats->access = Time::Now(); 91 stats->access = Time::Now();
92 92
93 content::RenderProcessHost* host = 93 content::RenderProcessHost* host =
94 content::RenderProcessHost::FromID(renderer_id); 94 content::RenderProcessHost::FromID(renderer_id);
95 if (host) { 95 if (host) {
96 mojom::WebCachePtr service; 96 mojom::WebCachePtr service;
97 host->GetRemoteInterfaces()->GetInterface(&service); 97 BindInterface(host, &service);
98 web_cache_services_[renderer_id] = std::move(service); 98 web_cache_services_[renderer_id] = std::move(service);
99 } 99 }
100 100
101 // Revise our allocation strategy to account for this new renderer. 101 // Revise our allocation strategy to account for this new renderer.
102 ReviseAllocationStrategyLater(); 102 ReviseAllocationStrategyLater();
103 } 103 }
104 104
105 void WebCacheManager::Remove(int renderer_id) { 105 void WebCacheManager::Remove(int renderer_id) {
106 // Erase all knowledge of this renderer 106 // Erase all knowledge of this renderer
107 active_renderers_.erase(renderer_id); 107 active_renderers_.erase(renderer_id);
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 inactive_renderers_.insert(*iter); 421 inactive_renderers_.insert(*iter);
422 active_renderers_.erase(*iter); 422 active_renderers_.erase(*iter);
423 iter = active_renderers_.begin(); 423 iter = active_renderers_.begin();
424 continue; 424 continue;
425 } 425 }
426 ++iter; 426 ++iter;
427 } 427 }
428 } 428 }
429 429
430 } // namespace web_cache 430 } // namespace web_cache
OLDNEW
« no previous file with comments | « components/visitedlink/test/visitedlink_unittest.cc ('k') | content/browser/browser_child_process_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698