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

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

Issue 7717012: ntp4: default to 18 apps per page for new installs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove checks Created 9 years, 4 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
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index d238fdea241180dbd039c2f98027c805ef6dfcf2..89d41fa053168f89f9ed8c822006ddd773d81eca 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -199,7 +199,7 @@ void SimpleExtensionLoadPrompt::ShowPrompt() {
void SimpleExtensionLoadPrompt::InstallUIProceed() {
if (extension_service_.get())
extension_service_->OnExtensionInstalled(
- extension_, false, 0); // Not from web store.
+ extension_, false, -1); // Not from web store.
delete this;
}
@@ -2230,6 +2230,15 @@ void ExtensionService::AddExtension(const Extension* extension) {
return;
}
+ // Unfortunately, we used to set app launcher indices for non-apps. If this
+ // extension has an index (page or in-page), set it to -1.
Matt Perry 2011/08/25 17:59:35 out of curiosity, why do we care whether a non-app
Evan Stade 2011/08/25 18:50:49 because we need to be able to count the number of
Matt Perry 2011/08/25 18:52:03 I see. Makes sense. Thanks for the explanation.
+ if (!extension->is_app()) {
+ if (extension_prefs_->GetAppLaunchIndex(extension->id()) != -1)
+ extension_prefs_->SetAppLaunchIndex(extension->id(), -1);
+ if (extension_prefs_->GetPageIndex(extension->id()) != -1)
+ extension_prefs_->SetPageIndex(extension->id(), -1);
+ }
+
extensions_.push_back(scoped_extension);
SyncExtensionChangeIfNeeded(*extension);
NotifyExtensionLoaded(extension);
@@ -2363,7 +2372,7 @@ void ExtensionService::OnLoadSingleExtension(const Extension* extension,
prompt->ShowPrompt();
return; // continues in SimpleExtensionLoadPrompt::InstallUI*
}
- OnExtensionInstalled(extension, false, 0); // Not from web store.
+ OnExtensionInstalled(extension, false, -1); // Not from web store.
}
void ExtensionService::OnExtensionInstalled(

Powered by Google App Engine
This is Rietveld 408576698