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

Side by Side Diff: chrome/browser/dom_ui/new_tab_ui.h

Issue 4708002: Add a histogram for tracking web store promo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: incorporate feedback, use ping attribute 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_DOM_UI_NEW_TAB_UI_H_ 5 #ifndef CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ 6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 virtual std::string GetMimeType(const std::string&) const; 64 virtual std::string GetMimeType(const std::string&) const;
65 65
66 // Setters and getters for first_run. 66 // Setters and getters for first_run.
67 static void set_first_run(bool first_run) { first_run_ = first_run; } 67 static void set_first_run(bool first_run) { first_run_ = first_run; }
68 static bool first_run() { return first_run_; } 68 static bool first_run() { return first_run_; }
69 69
70 private: 70 private:
71 virtual ~NewTabHTMLSource() {} 71 virtual ~NewTabHTMLSource() {}
72 72
73 // Records a web store launch in the appropriate histograms. |promo_active|
74 // specifies if the web store promotion was active.
75 void RecordWebStoreLaunch(bool promo_active);
76
77 // Records an app launch in the appropriate histograms. |promo_active|
78 // specifies if the web store promotion was active.
79 void RecordAppLaunch(bool promo_active);
80
81 // Returns true if |path| indicates that the promotion is active, false if
82 // the promo is not active.
83 bool IsPromoActive(const std::string& path);
84
73 // Whether this is the first run. 85 // Whether this is the first run.
74 static bool first_run_; 86 static bool first_run_;
75 87
76 // Pointer back to the original profile. 88 // Pointer back to the original profile.
77 Profile* profile_; 89 Profile* profile_;
78 90
79 DISALLOW_COPY_AND_ASSIGN(NewTabHTMLSource); 91 DISALLOW_COPY_AND_ASSIGN(NewTabHTMLSource);
80 }; 92 };
81 93
82 private: 94 private:
(...skipping 12 matching lines...) Expand all
95 107
96 NotificationRegistrar registrar_; 108 NotificationRegistrar registrar_;
97 109
98 // The preference version. This used for migrating prefs of the NTP. 110 // The preference version. This used for migrating prefs of the NTP.
99 static const int current_pref_version_ = 3; 111 static const int current_pref_version_ = 3;
100 112
101 DISALLOW_COPY_AND_ASSIGN(NewTabUI); 113 DISALLOW_COPY_AND_ASSIGN(NewTabUI);
102 }; 114 };
103 115
104 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_ 116 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698