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

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

Issue 2819023: Reworked ExtensionsService::AddPendingExtension(). (Closed)
Patch Set: Fixed browsertest test failure Created 10 years, 6 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 | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 0f9661c810cd20fd4da1fa4d865709fe15515b9b..93f29c41a62093b9a8a0c69390daa373ecadada5 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -444,13 +444,14 @@ void ExtensionPrefs::SetToolbarOrder(
prefs_->ScheduleSavePersistentPrefs();
}
-void ExtensionPrefs::OnExtensionInstalled(Extension* extension) {
+void ExtensionPrefs::OnExtensionInstalled(
+ Extension* extension, Extension::State initial_state,
+ bool initial_incognito_enabled) {
const std::string& id = extension->id();
- // Make sure we don't enable a disabled extension.
- if (GetExtensionState(extension->id()) != Extension::DISABLED) {
- UpdateExtensionPref(id, kPrefState,
- Value::CreateIntegerValue(Extension::ENABLED));
- }
+ UpdateExtensionPref(id, kPrefState,
+ Value::CreateIntegerValue(initial_state));
+ UpdateExtensionPref(id, kPrefIncognitoEnabled,
+ Value::CreateBooleanValue(initial_incognito_enabled));
UpdateExtensionPref(id, kPrefLocation,
Value::CreateIntegerValue(extension->location()));
FilePath::StringType path = MakePathRelative(install_directory_,
« no previous file with comments | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extension_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698