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

Side by Side 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: Adding missing SOURCE gets and puts 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_ 5 #ifndef CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_
6 #define CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_ 6 #define CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "content/public/common/manifest.h" 9 #include "content/public/common/manifest.h"
10 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationLockType.h" 10 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationLockType.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 12
13 // Information needed to create a shortcut via ShortcutHelper. 13 // Information needed to create a shortcut via ShortcutHelper.
14 struct ShortcutInfo { 14 struct ShortcutInfo {
15 enum Source {
Ilya Sherman 2015/07/03 18:11:45 Please document that this is used to back an UMA h
dominickn 2015/07/05 23:33:17 Done.
16 SOURCE_UNKNOWN = 0,
17 SOURCE_ADD_TO_HOMESCREEN = 1,
18 SOURCE_APP_BANNER = 2,
19 SOURCE_COUNT = 3
20 };
21
15 ShortcutInfo(); 22 ShortcutInfo();
16 explicit ShortcutInfo(const GURL& shortcut_url); 23 explicit ShortcutInfo(const GURL& shortcut_url);
17 24
18 // Updates the info based on the given |manifest|. 25 // Updates the info based on the given |manifest|.
19 void UpdateFromManifest(const content::Manifest& manifest); 26 void UpdateFromManifest(const content::Manifest& manifest);
20 27
28 // Updates the source of the shortcut.
29 void UpdateSource(const Source source);
30
21 GURL url; 31 GURL url;
22 base::string16 title; 32 base::string16 title;
23 content::Manifest::DisplayMode display; 33 content::Manifest::DisplayMode display;
24 blink::WebScreenOrientationLockType orientation; 34 blink::WebScreenOrientationLockType orientation;
35 Source source;
25 }; 36 };
26 37
27 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_ 38 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698