Chromium Code Reviews| 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..720d3ed6a59e4f2014b616d98967df5d6e1b65c6 100644 |
| --- a/chrome/browser/extensions/chrome_extensions_browser_client.cc |
| +++ b/chrome/browser/extensions/chrome_extensions_browser_client.cc |
| @@ -120,16 +120,14 @@ 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) && |
| + if ((static_cast<Profile*>(context))->IsGuestSession() && |
|
msw
2014/02/15 00:30:52
nit: convert this if statement and following retur
bcwhite
2014/02/18 15:19:36
Done.
|
| !context->IsOffTheRecord()) { |
| return false; |
| } |
| -#endif |
| + |
| return true; |
| } |