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

Side by Side Diff: chrome/browser/rlz/rlz.h

Issue 11506006: [cros] RLZ tracking can be turned off via a flag file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-apply ps#16, it got lost Created 8 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RLZ_RLZ_H_ 5 #ifndef CHROME_BROWSER_RLZ_RLZ_H_
6 #define CHROME_BROWSER_RLZ_RLZ_H_ 6 #define CHROME_BROWSER_RLZ_RLZ_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(ENABLE_RLZ) 10 #if defined(ENABLE_RLZ)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Returns false if the rlz string could not be obtained. In some cases 68 // Returns false if the rlz string could not be obtained. In some cases
69 // an empty string can be returned which is not an error. 69 // an empty string can be returned which is not an error.
70 static bool GetAccessPointRlz(rlz_lib::AccessPoint point, string16* rlz); 70 static bool GetAccessPointRlz(rlz_lib::AccessPoint point, string16* rlz);
71 71
72 // Invoked during shutdown to clean up any state created by RLZTracker. 72 // Invoked during shutdown to clean up any state created by RLZTracker.
73 static void CleanupRlz(); 73 static void CleanupRlz();
74 74
75 // This method is public for use by the Singleton class. 75 // This method is public for use by the Singleton class.
76 static RLZTracker* GetInstance(); 76 static RLZTracker* GetInstance();
77 77
78 // Enables zero delay for InitRlzFromProfileDelayed. For testing only.
79 static void EnableZeroDelayForTesting();
80
78 // The following methods are made protected so that they can be used for 81 // The following methods are made protected so that they can be used for
79 // testing purposes. Production code should never need to call these. 82 // testing purposes. Production code should never need to call these.
80 protected: 83 protected:
81 RLZTracker(); 84 RLZTracker();
82 virtual ~RLZTracker(); 85 virtual ~RLZTracker();
83 86
84 // Called by InitRlzFromProfileDelayed with values taken from |profile|. 87 // Called by InitRlzFromProfileDelayed with values taken from |profile|.
85 static bool InitRlzDelayed(bool first_run, 88 static bool InitRlzDelayed(bool first_run,
86 int delay, 89 int delay,
87 bool is_google_default_search, 90 bool is_google_default_search,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // Keeps track of whether the omnibox or host page have been used. 194 // Keeps track of whether the omnibox or host page have been used.
192 bool omnibox_used_; 195 bool omnibox_used_;
193 bool homepage_used_; 196 bool homepage_used_;
194 197
195 // Main and (optionally) reactivation brand codes, assigned on UI thread. 198 // Main and (optionally) reactivation brand codes, assigned on UI thread.
196 std::string brand_; 199 std::string brand_;
197 std::string reactivation_brand_; 200 std::string reactivation_brand_;
198 201
199 content::NotificationRegistrar registrar_; 202 content::NotificationRegistrar registrar_;
200 203
204 // Minimum delay before sending financial ping after initialization.
Peter Kasting 2012/12/17 20:14:03 Nit: Another instance of "financial ping"
Ivan Korotkov 2012/12/20 09:20:42 Well, here it's OK since these are RLZTracker guts
205 int min_delay_;
206
201 DISALLOW_COPY_AND_ASSIGN(RLZTracker); 207 DISALLOW_COPY_AND_ASSIGN(RLZTracker);
202 }; 208 };
203 209
204 #endif // defined(ENABLE_RLZ) 210 #endif // defined(ENABLE_RLZ)
205 211
206 #endif // CHROME_BROWSER_RLZ_RLZ_H_ 212 #endif // CHROME_BROWSER_RLZ_RLZ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698