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

Unified Diff: extensions/browser/process_manager.cc

Issue 2149953002: Enable login screen apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Stefan feedback Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | extensions/browser/process_manager_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/process_manager.cc
diff --git a/extensions/browser/process_manager.cc b/extensions/browser/process_manager.cc
index dc3b5e71266cc0a0b0c4ed56d36d244f6ed572b3..6b7819034f090ddcb27d3548bbf51f75830d4354 100644
--- a/extensions/browser/process_manager.cc
+++ b/extensions/browser/process_manager.cc
@@ -106,7 +106,6 @@ class IncognitoProcessManager : public ProcessManager {
static void CreateBackgroundHostForExtensionLoad(
ProcessManager* manager, const Extension* extension) {
- DVLOG(1) << "CreateBackgroundHostForExtensionLoad " << extension->id();
if (BackgroundInfo::HasPersistentBackgroundPage(extension))
manager->CreateBackgroundHost(extension,
BackgroundInfo::GetBackgroundURL(extension));
@@ -365,13 +364,15 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
// Don't create hosts if the embedder doesn't allow it.
ProcessManagerDelegate* delegate =
ExtensionsBrowserClient::Get()->GetProcessManagerDelegate();
- if (delegate && !delegate->IsBackgroundPageAllowed(browser_context_))
+ if (delegate &&
+ !delegate->IsExtensionBackgroundPageAllowed(browser_context_, *extension))
return false;
// Don't create multiple background hosts for an extension.
if (GetBackgroundHostForExtension(extension->id()))
return true; // TODO(kalman): return false here? It might break things...
+ DVLOG(1) << "CreateBackgroundHost " << extension->id();
ExtensionHost* host =
new ExtensionHost(extension, GetSiteInstanceForURL(url).get(), url,
VIEW_TYPE_EXTENSION_BACKGROUND_PAGE);
@@ -387,7 +388,8 @@ void ProcessManager::MaybeCreateStartupBackgroundHosts() {
// The embedder might disallow background pages entirely.
ProcessManagerDelegate* delegate =
ExtensionsBrowserClient::Get()->GetProcessManagerDelegate();
- if (delegate && !delegate->IsBackgroundPageAllowed(browser_context_))
+ if (delegate &&
+ !delegate->AreBackgroundPagesAllowedForContext(browser_context_))
return;
// The embedder might want to defer background page loading. For example,
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | extensions/browser/process_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698