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

Unified Diff: chrome/browser/android/shortcut_info.h

Issue 1220813010: Add UMA metrics to track the source of homescreen icons on launch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing reviewer comments Created 5 years, 5 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/android/shortcut_helper.cc ('k') | chrome/browser/android/shortcut_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/shortcut_info.h
diff --git a/chrome/browser/android/shortcut_info.h b/chrome/browser/android/shortcut_info.h
index e641c0b6c9b8f7f839376ce98f3b2e724049e8a5..3b0d01fa61fbcbc80cc98fcbb0c52424db394f51 100644
--- a/chrome/browser/android/shortcut_info.h
+++ b/chrome/browser/android/shortcut_info.h
@@ -12,16 +12,30 @@
// Information needed to create a shortcut via ShortcutHelper.
struct ShortcutInfo {
+
+ // This enum is used to back a UMA histogram, and must be treated as
+ // append-only.
+ enum Source {
+ SOURCE_UNKNOWN = 0,
+ SOURCE_ADD_TO_HOMESCREEN = 1,
+ SOURCE_APP_BANNER = 2,
+ SOURCE_COUNT = 3
+ };
+
ShortcutInfo();
explicit ShortcutInfo(const GURL& shortcut_url);
// Updates the info based on the given |manifest|.
void UpdateFromManifest(const content::Manifest& manifest);
+ // Updates the source of the shortcut.
+ void UpdateSource(const Source source);
+
GURL url;
base::string16 title;
content::Manifest::DisplayMode display;
blink::WebScreenOrientationLockType orientation;
+ Source source;
};
#endif // CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_
« no previous file with comments | « chrome/browser/android/shortcut_helper.cc ('k') | chrome/browser/android/shortcut_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698