| 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 69b3a96e11a7ad6a42c69b50c0f4f93c17142572..f6b129246f6011c42ab595d6cccefca3204a14f1 100644
|
| --- a/chrome/browser/extensions/chrome_extensions_browser_client.cc
|
| +++ b/chrome/browser/extensions/chrome_extensions_browser_client.cc
|
| @@ -18,6 +18,10 @@
|
| #include "chrome/common/chrome_version_info.h"
|
| #include "chrome/common/pref_names.h"
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +#include "chromeos/chromeos_switches.h"
|
| +#endif
|
| +
|
| namespace extensions {
|
|
|
| ChromeExtensionsBrowserClient::ChromeExtensionsBrowserClient() {}
|
| @@ -89,6 +93,21 @@ bool ChromeExtensionsBrowserClient::DeferLoadingBackgroundHosts(
|
| #endif
|
| }
|
|
|
| +bool ChromeExtensionsBrowserClient::IsBackgroundPageAllowed(
|
| + content::BrowserContext* context) const {
|
| +#if defined(OS_CHROMEOS)
|
| + // Returns true if current session is Chrome OS 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;
|
| +}
|
| +
|
| bool ChromeExtensionsBrowserClient::DidVersionUpdate(
|
| content::BrowserContext* context) {
|
| Profile* profile = static_cast<Profile*>(context);
|
|
|