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

Unified Diff: chrome/browser/extensions/chrome_extensions_browser_client.cc

Issue 164333007: Switch guest profile from forced-incognito to UI mods like ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed review comments by msw Created 6 years, 10 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 | « no previous file | chrome/browser/extensions/extension_system_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/chrome_extensions_browser_client.cc
diff --git a/chrome/browser/extensions/chrome_extensions_browser_client.cc b/chrome/browser/extensions/chrome_extensions_browser_client.cc
index 728407488db70bf41405a12b9a294ae613744408..23d2e255c385c9a5eb0efd925ec96b02cbf40870 100644
--- a/chrome/browser/extensions/chrome_extensions_browser_client.cc
+++ b/chrome/browser/extensions/chrome_extensions_browser_client.cc
@@ -120,17 +120,11 @@ bool ChromeExtensionsBrowserClient::DeferLoadingBackgroundHosts(
bool ChromeExtensionsBrowserClient::IsBackgroundPageAllowed(
content::BrowserContext* context) const {
-#if defined(OS_CHROMEOS)
- // Returns true if current session is Chrome OS Guest mode session and current
+ // Returns true if current session is Guest mode session and current
// browser context is *not* off-the-record. Such context is artificial and
// background page shouldn't be created in it.
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(chromeos::switches::kGuestSession) &&
- !context->IsOffTheRecord()) {
- return false;
- }
-#endif
- return true;
+ return !static_cast<Profile*>(context)->IsGuestSession() ||
+ context->IsOffTheRecord();
}
void ChromeExtensionsBrowserClient::OnExtensionHostCreated(
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_system_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698