Chromium Code Reviews| Index: chrome/browser/extensions/extension_service.cc |
| diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc |
| index 6fe5f1eb5e33ce1b4fc0e7410b12ce650183f979..7474650a92611919ce09a44413633a511de1f86c 100644 |
| --- a/chrome/browser/extensions/extension_service.cc |
| +++ b/chrome/browser/extensions/extension_service.cc |
| @@ -1583,8 +1583,15 @@ void ExtensionService::SetIsIncognitoEnabled( |
| const std::string& extension_id, bool enabled) { |
| const Extension* extension = GetInstalledExtension(extension_id); |
| if (extension && extension->location() == Extension::COMPONENT) { |
| - // This shouldn't be called for component extensions. |
| - NOTREACHED(); |
| + // This shouldn't be called for component extensions other than the |
| + // web store (which is consider an app, and may try to set this value). |
| + DCHECK_EQ(extension_misc::kWebStoreAppId, extension_id); |
|
akalin
2012/02/03 01:44:43
flip argument order (unlike EXPECT_*, should match
csharp
2012/02/03 14:57:04
Done.
|
| + |
| + // If we are here with the CWS, make sure the we aren't trying to |
| + // change it. |
| + if (extension_id == extension_misc::kWebStoreAppId) |
|
akalin
2012/02/03 01:44:43
i think this if statement is unnecessary; if you'r
csharp
2012/02/03 14:57:04
Done.
|
| + DCHECK_EQ(IsIncognitoEnabled(extension_id), enabled); |
| + |
| return; |
| } |