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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 11419307: Garbage Collect the Storage directory on next profile start after an extension uninstall. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: done done Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/browser_context.cc ('k') | content/browser/site_instance_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 // static 1394 // static
1395 RenderProcessHost* RenderProcessHostImpl::GetProcessHostForSite( 1395 RenderProcessHost* RenderProcessHostImpl::GetProcessHostForSite(
1396 BrowserContext* browser_context, 1396 BrowserContext* browser_context,
1397 const GURL& url) { 1397 const GURL& url) {
1398 // Look up the map of site to process for the given browser_context. 1398 // Look up the map of site to process for the given browser_context.
1399 SiteProcessMap* map = 1399 SiteProcessMap* map =
1400 GetSiteProcessMapForBrowserContext(browser_context); 1400 GetSiteProcessMapForBrowserContext(browser_context);
1401 1401
1402 // See if we have an existing process for this site. If not, the caller 1402 // See if we have an existing process for this site. If not, the caller
1403 // should create a new process and register it. 1403 // should create a new process and register it.
1404 std::string site = SiteInstanceImpl::GetSiteForURL(browser_context, url) 1404 std::string site = SiteInstance::GetSiteForURL(browser_context, url)
1405 .possibly_invalid_spec(); 1405 .possibly_invalid_spec();
1406 return map->FindProcess(site); 1406 return map->FindProcess(site);
1407 } 1407 }
1408 1408
1409 void RenderProcessHostImpl::RegisterProcessHostForSite( 1409 void RenderProcessHostImpl::RegisterProcessHostForSite(
1410 BrowserContext* browser_context, 1410 BrowserContext* browser_context,
1411 RenderProcessHost* process, 1411 RenderProcessHost* process,
1412 const GURL& url) { 1412 const GURL& url) {
1413 // Look up the map of site to process for the given browser_context. 1413 // Look up the map of site to process for the given browser_context.
1414 SiteProcessMap* map = 1414 SiteProcessMap* map =
1415 GetSiteProcessMapForBrowserContext(browser_context); 1415 GetSiteProcessMapForBrowserContext(browser_context);
1416 1416
1417 // TODO(creis): Determine if it's better to allow registration of 1417 // TODO(creis): Determine if it's better to allow registration of
1418 // empty sites or not. For now, group anything from which we can't parse 1418 // empty sites or not. For now, group anything from which we can't parse
1419 // a site into the same process, when using --process-per-site. 1419 // a site into the same process, when using --process-per-site.
1420 std::string site = SiteInstanceImpl::GetSiteForURL(browser_context, url) 1420 std::string site = SiteInstance::GetSiteForURL(browser_context, url)
1421 .possibly_invalid_spec(); 1421 .possibly_invalid_spec();
1422 map->RegisterProcess(site, process); 1422 map->RegisterProcess(site, process);
1423 } 1423 }
1424 1424
1425 void RenderProcessHostImpl::ProcessDied(bool already_dead) { 1425 void RenderProcessHostImpl::ProcessDied(bool already_dead) {
1426 // Our child process has died. If we didn't expect it, it's a crash. 1426 // Our child process has died. If we didn't expect it, it's a crash.
1427 // In any case, we need to let everyone know it's gone. 1427 // In any case, we need to let everyone know it's gone.
1428 // The OnChannelError notification can fire multiple times due to nested sync 1428 // The OnChannelError notification can fire multiple times due to nested sync
1429 // calls to a renderer. If we don't have a valid channel here it means we 1429 // calls to a renderer. If we don't have a valid channel here it means we
1430 // already handled the error. 1430 // already handled the error.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 int32 gpu_process_host_id) { 1588 int32 gpu_process_host_id) {
1589 TRACE_EVENT0("renderer_host", 1589 TRACE_EVENT0("renderer_host",
1590 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); 1590 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost");
1591 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, 1591 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
1592 gpu_process_host_id, 1592 gpu_process_host_id,
1593 surface_handle, 1593 surface_handle,
1594 0); 1594 0);
1595 } 1595 }
1596 1596
1597 } // namespace content 1597 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_context.cc ('k') | content/browser/site_instance_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698