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

Side by Side Diff: chrome/browser/extensions/chrome_process_manager_delegate.cc

Issue 1129293002: Fix the System Profile with extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove autogenerated actions Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/extensions/chrome_process_manager_delegate.h" 5 #include "chrome/browser/extensions/chrome_process_manager_delegate.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/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 23 matching lines...) Expand all
34 content::NotificationService::AllSources()); 34 content::NotificationService::AllSources());
35 } 35 }
36 36
37 ChromeProcessManagerDelegate::~ChromeProcessManagerDelegate() { 37 ChromeProcessManagerDelegate::~ChromeProcessManagerDelegate() {
38 } 38 }
39 39
40 bool ChromeProcessManagerDelegate::IsBackgroundPageAllowed( 40 bool ChromeProcessManagerDelegate::IsBackgroundPageAllowed(
41 content::BrowserContext* context) const { 41 content::BrowserContext* context) const {
42 Profile* profile = static_cast<Profile*>(context); 42 Profile* profile = static_cast<Profile*>(context);
43 43
44 bool is_normal_session = !profile->IsGuestSession(); 44 bool is_normal_session = !profile->IsGuestSession() &&
45 !profile->IsSystemProfile();
45 #if defined(OS_CHROMEOS) 46 #if defined(OS_CHROMEOS)
46 is_normal_session = is_normal_session && 47 is_normal_session = is_normal_session &&
47 user_manager::UserManager::Get()->IsUserLoggedIn(); 48 user_manager::UserManager::Get()->IsUserLoggedIn();
48 #endif 49 #endif
49 50
50 // Disallow if the current session is a Guest mode session or login screen but 51 // Disallow if the current session is a Guest mode session or login screen but
51 // the current browser context is *not* off-the-record. Such context is 52 // the current browser context is *not* off-the-record. Such context is
52 // artificial and background page shouldn't be created in it. 53 // artificial and background page shouldn't be created in it.
53 // http://crbug.com/329498 54 // http://crbug.com/329498
54 return is_normal_session || profile->IsOffTheRecord(); 55 return is_normal_session || profile->IsOffTheRecord();
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 ProcessManager* incognito_manager = 163 ProcessManager* incognito_manager =
163 ProcessManagerFactory::GetForBrowserContextIfExists( 164 ProcessManagerFactory::GetForBrowserContextIfExists(
164 profile->GetOffTheRecordProfile()); 165 profile->GetOffTheRecordProfile());
165 if (incognito_manager) { 166 if (incognito_manager) {
166 incognito_manager->CloseBackgroundHosts(); 167 incognito_manager->CloseBackgroundHosts();
167 } 168 }
168 } 169 }
169 } 170 }
170 171
171 } // namespace extensions 172 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/extensions/extension_system_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698