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

Side by Side Diff: content/browser/browsing_instance.cc

Issue 7328029: Use process-per-app-instance for hosted apps without background permission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incognito function. Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/browsing_instance.h" 5 #include "content/browser/browsing_instance.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "content/browser/content_browser_client.h" 10 #include "content/browser/content_browser_client.h"
(...skipping 19 matching lines...) Expand all
30 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 30 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
31 if (command_line.HasSwitch(switches::kProcessPerSite)) 31 if (command_line.HasSwitch(switches::kProcessPerSite))
32 return true; 32 return true;
33 33
34 // We want to consolidate particular sites like extensions and WebUI whether 34 // We want to consolidate particular sites like extensions and WebUI whether
35 // it is in process-per-tab or process-per-site-instance. 35 // it is in process-per-tab or process-per-site-instance.
36 // Note that --single-process may have been specified, but that affects the 36 // Note that --single-process may have been specified, but that affects the
37 // process creation logic in RenderProcessHost, so we do not need to worry 37 // process creation logic in RenderProcessHost, so we do not need to worry
38 // about it here. 38 // about it here.
39 39
40 if (url.SchemeIs(chrome::kExtensionScheme)) 40 if (content::GetContentClient()->browser()->ShouldUseProcessPerSite(profile_,
41 url))
41 return true; 42 return true;
42 43
43 // DevTools pages have WebUI type but should not reuse the same host. 44 // DevTools pages have WebUI type but should not reuse the same host.
44 if (content::WebUIFactory::Get()->UseWebUIForURL(profile_, url) && 45 if (content::WebUIFactory::Get()->UseWebUIForURL(profile_, url) &&
45 !url.SchemeIs(chrome::kChromeDevToolsScheme)) { 46 !url.SchemeIs(chrome::kChromeDevToolsScheme)) {
46 return true; 47 return true;
47 } 48 }
48 49
49 // In all other cases, don't use process-per-site logic. 50 // In all other cases, don't use process-per-site logic.
50 return false; 51 return false;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return true; 144 return true;
144 } 145 }
145 return false; 146 return false;
146 } 147 }
147 148
148 BrowsingInstance::~BrowsingInstance() { 149 BrowsingInstance::~BrowsingInstance() {
149 // We should only be deleted when all of the SiteInstances that refer to 150 // We should only be deleted when all of the SiteInstances that refer to
150 // us are gone. 151 // us are gone.
151 DCHECK(site_instance_map_.empty()); 152 DCHECK(site_instance_map_.empty());
152 } 153 }
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/app_process_instances/path2/empty.html ('k') | content/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698