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

Unified Diff: chrome/browser/dom_ui/app_launcher_handler.h

Issue 4708002: Add a histogram for tracking web store promo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reorder methods in app_launcher_handler Created 10 years, 1 month 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 | « no previous file | chrome/browser/dom_ui/app_launcher_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/app_launcher_handler.h
diff --git a/chrome/browser/dom_ui/app_launcher_handler.h b/chrome/browser/dom_ui/app_launcher_handler.h
index 5a3478ecb88cea16a92e40c4ba8692ed875e9ca5..1ebeaf7b548be78b700f769cffacfad7710fe436 100644
--- a/chrome/browser/dom_ui/app_launcher_handler.h
+++ b/chrome/browser/dom_ui/app_launcher_handler.h
@@ -32,6 +32,14 @@ class AppLauncherHandler
explicit AppLauncherHandler(ExtensionsService* extension_service);
virtual ~AppLauncherHandler();
+ // Populate a dictionary with the information from an extension.
+ static void CreateAppInfo(const Extension* extension,
+ ExtensionPrefs* extension_prefs,
+ DictionaryValue* value);
+
+ // Callback for pings related to launching apps on the NTP.
+ static bool HandlePing(const std::string& path);
+
// DOMMessageHandler implementation.
virtual DOMMessageHandler* Attach(DOMUI* dom_ui);
virtual void RegisterMessages();
@@ -41,11 +49,6 @@ class AppLauncherHandler
const NotificationSource& source,
const NotificationDetails& details);
- // Populate a dictionary with the information from an extension.
- static void CreateAppInfo(const Extension* extension,
- ExtensionPrefs* extension_prefs,
- DictionaryValue* value);
-
// Populate the given dictionary with all installed app info.
void FillAppDictionary(DictionaryValue* value);
@@ -65,6 +68,14 @@ class AppLauncherHandler
void HandleHideAppsPromo(const ListValue* args);
private:
+ // Records a web store launch in the appropriate histograms. |promo_active|
+ // specifies if the web store promotion was active.
+ static void RecordWebStoreLaunch(bool promo_active);
+
+ // Records an app launch in the appropriate histograms. |promo_active|
+ // specifies if the web store promotion was active.
+ static void RecordAppLaunch(bool promo_active);
+
// ExtensionInstallUI::Delegate implementation, used for receiving
// notification about uninstall confirmation dialog selections.
virtual void InstallUIProceed();
@@ -94,6 +105,9 @@ class AppLauncherHandler
// The id of the extension we are prompting the user about.
std::string extension_id_prompting_;
+ // Whether the promo is currently being shown.
+ bool promo_active_;
+
DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler);
};
« no previous file with comments | « no previous file | chrome/browser/dom_ui/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698