Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 | 80 |
| 81 #if defined(OS_CHROMEOS) | 81 #if defined(OS_CHROMEOS) |
| 82 // Clears all product state. Should be called when turning RLZ off. On other | 82 // Clears all product state. Should be called when turning RLZ off. On other |
| 83 // platforms, this is done by product uninstaller. | 83 // platforms, this is done by product uninstaller. |
| 84 static void ClearRlzState(); | 84 static void ClearRlzState(); |
| 85 #endif | 85 #endif |
| 86 | 86 |
| 87 // This method is public for use by the Singleton class. | 87 // This method is public for use by the Singleton class. |
| 88 static RLZTracker* GetInstance(); | 88 static RLZTracker* GetInstance(); |
| 89 | 89 |
| 90 // Called when Chrome is shutting down. | |
| 91 static void PostMainMessageLoopRun(); | |
|
Roger Tawa OOO till Jul 10th
2013/04/29 16:56:45
If we do need this method, better to rename this s
bcwhite
2013/04/29 19:21:34
I was trying to keep the name consistent with ever
| |
| 92 | |
| 90 // Enables zero delay for InitRlzFromProfileDelayed. For testing only. | 93 // Enables zero delay for InitRlzFromProfileDelayed. For testing only. |
| 91 static void EnableZeroDelayForTesting(); | 94 static void EnableZeroDelayForTesting(); |
| 92 | 95 |
| 93 // The following methods are made protected so that they can be used for | 96 // The following methods are made protected so that they can be used for |
| 94 // testing purposes. Production code should never need to call these. | 97 // testing purposes. Production code should never need to call these. |
| 95 protected: | 98 protected: |
| 96 RLZTracker(); | 99 RLZTracker(); |
| 97 virtual ~RLZTracker(); | 100 virtual ~RLZTracker(); |
| 98 | 101 |
| 99 // Called by InitRlzFromProfileDelayed with values taken from |profile|. | 102 // Called by InitRlzFromProfileDelayed with values taken from |profile|. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 bool send_ping_immediately_; | 198 bool send_ping_immediately_; |
| 196 bool is_google_default_search_; | 199 bool is_google_default_search_; |
| 197 bool is_google_homepage_; | 200 bool is_google_homepage_; |
| 198 bool is_google_in_startpages_; | 201 bool is_google_in_startpages_; |
| 199 | 202 |
| 200 // Unique sequence token so that tasks posted by RLZTracker are executed | 203 // Unique sequence token so that tasks posted by RLZTracker are executed |
| 201 // sequentially in the blocking pool. | 204 // sequentially in the blocking pool. |
| 202 base::SequencedWorkerPool::SequenceToken worker_pool_token_; | 205 base::SequencedWorkerPool::SequenceToken worker_pool_token_; |
| 203 | 206 |
| 204 // URLRequestContextGetter used by RLZ library. | 207 // URLRequestContextGetter used by RLZ library. |
| 205 net::URLRequestContextGetter* url_request_context_; | 208 net::URLRequestContextGetter* url_request_context_; |
|
Roger Tawa OOO till Jul 10th
2013/04/29 16:56:45
This member is unused. Lets delete it?
bcwhite
2013/04/29 19:21:34
Done.
| |
| 206 | 209 |
| 207 // Keeps track if the RLZ tracker has already performed its delayed | 210 // Keeps track if the RLZ tracker has already performed its delayed |
| 208 // initialization. | 211 // initialization. |
| 209 bool already_ran_; | 212 bool already_ran_; |
| 210 | 213 |
| 211 // Keeps a cache of RLZ access point strings, since they rarely change. | 214 // Keeps a cache of RLZ access point strings, since they rarely change. |
| 212 // The cache must be protected by a lock since it may be accessed from | 215 // The cache must be protected by a lock since it may be accessed from |
| 213 // the UI thread for reading and the IO thread for reading and/or writing. | 216 // the UI thread for reading and the IO thread for reading and/or writing. |
| 214 base::Lock cache_lock_; | 217 base::Lock cache_lock_; |
| 215 std::map<rlz_lib::AccessPoint, string16> rlz_cache_; | 218 std::map<rlz_lib::AccessPoint, string16> rlz_cache_; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 226 | 229 |
| 227 // Minimum delay before sending financial ping after initialization. | 230 // Minimum delay before sending financial ping after initialization. |
| 228 base::TimeDelta min_init_delay_; | 231 base::TimeDelta min_init_delay_; |
| 229 | 232 |
| 230 DISALLOW_COPY_AND_ASSIGN(RLZTracker); | 233 DISALLOW_COPY_AND_ASSIGN(RLZTracker); |
| 231 }; | 234 }; |
| 232 | 235 |
| 233 #endif // defined(ENABLE_RLZ) | 236 #endif // defined(ENABLE_RLZ) |
| 234 | 237 |
| 235 #endif // CHROME_BROWSER_RLZ_RLZ_H_ | 238 #endif // CHROME_BROWSER_RLZ_RLZ_H_ |
| OLD | NEW |