Chromium Code Reviews

Unified Diff: chrome/browser/extensions/default_apps.h

Issue 5750005: Default apps promo was getting expired early if NTP open. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « chrome/browser/dom_ui/app_launcher_handler.cc ('k') | chrome/browser/extensions/default_apps.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/default_apps.h
diff --git a/chrome/browser/extensions/default_apps.h b/chrome/browser/extensions/default_apps.h
index 767b2f3f99f68713b93a3ef07fae3e7336cff4b5..a6e899eba81972936a1cc74d3b4d6d0135d77679 100644
--- a/chrome/browser/extensions/default_apps.h
+++ b/chrome/browser/extensions/default_apps.h
@@ -50,10 +50,11 @@ class DefaultApps {
// all the default apps, GetAppsToInstall() will start returning NULL.
void DidInstallApp(const ExtensionIdSet& installed_ids);
- // Returns true if the apps promo should be displayed in the launcher. This
- // starts returning true once the default apps have all been installed and
- // stops after the promo expires.
- bool ShouldShowPromo(const ExtensionIdSet& installed_ids);
+ // Returns true if the apps promo should be displayed in the launcher.
+ //
+ // NOTE: If the default apps have been installed, but |installed_ids| is
+ // different than GetDefaultApps(), this will permanently expire the promo.
+ bool CheckShouldShowPromo(const ExtensionIdSet& installed_ids);
// Should be called after each time the promo is installed.
void DidShowPromo();
@@ -62,10 +63,10 @@ class DefaultApps {
void SetPromoHidden();
private:
- FRIEND_TEST_ALL_PREFIXES(DefaultApps, Basics);
- FRIEND_TEST_ALL_PREFIXES(DefaultApps, HidePromo);
- FRIEND_TEST_ALL_PREFIXES(DefaultApps, InstallingAnAppHidesPromo);
- FRIEND_TEST_ALL_PREFIXES(DefaultApps,
+ FRIEND_TEST_ALL_PREFIXES(ExtensionDefaultApps, Basics);
+ FRIEND_TEST_ALL_PREFIXES(ExtensionDefaultApps, HidePromo);
+ FRIEND_TEST_ALL_PREFIXES(ExtensionDefaultApps, InstallingAnAppHidesPromo);
+ FRIEND_TEST_ALL_PREFIXES(ExtensionDefaultApps,
ManualAppInstalledWhileInstallingDefaultApps);
bool GetDefaultAppsInstalled() const;
« no previous file with comments | « chrome/browser/dom_ui/app_launcher_handler.cc ('k') | chrome/browser/extensions/default_apps.cc » ('j') | no next file with comments »

Powered by Google App Engine