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 COMPONENTS_RLZ_RLZ_TRACKER_H_ | 5 #ifndef COMPONENTS_RLZ_RLZ_TRACKER_H_ |
6 #define COMPONENTS_RLZ_RLZ_TRACKER_H_ | 6 #define COMPONENTS_RLZ_RLZ_TRACKER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // Used by test code to override the default RLZTracker instance returned | 116 // Used by test code to override the default RLZTracker instance returned |
117 // by GetInstance(). | 117 // by GetInstance(). |
118 void set_tracker(RLZTracker* tracker) { tracker_ = tracker; } | 118 void set_tracker(RLZTracker* tracker) { tracker_ = tracker; } |
119 | 119 |
120 // Sends the financial ping to the RLZ servers and invalidates the RLZ string | 120 // Sends the financial ping to the RLZ servers and invalidates the RLZ string |
121 // cache since the response from the RLZ server may have changed then. | 121 // cache since the response from the RLZ server may have changed then. |
122 // Protected so that its accessible from tests. | 122 // Protected so that its accessible from tests. |
123 void PingNowImpl(); | 123 void PingNowImpl(); |
124 | 124 |
125 private: | 125 private: |
126 friend struct DefaultSingletonTraits<RLZTracker>; | 126 friend struct base::DefaultSingletonTraits<RLZTracker>; |
127 friend class base::RefCountedThreadSafe<RLZTracker>; | 127 friend class base::RefCountedThreadSafe<RLZTracker>; |
128 | 128 |
129 // Implementation called from SetRlzDelegate() static method. | 129 // Implementation called from SetRlzDelegate() static method. |
130 void SetDelegate(scoped_ptr<RLZTrackerDelegate> delegate); | 130 void SetDelegate(scoped_ptr<RLZTrackerDelegate> delegate); |
131 | 131 |
132 // Implementation called from InitRlzDelayed() static method. | 132 // Implementation called from InitRlzDelayed() static method. |
133 bool Init(bool first_run, | 133 bool Init(bool first_run, |
134 bool send_ping_immediately, | 134 bool send_ping_immediately, |
135 base::TimeDelta delay, | 135 base::TimeDelta delay, |
136 bool is_google_default_search, | 136 bool is_google_default_search, |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 | 233 |
234 // Minimum delay before sending financial ping after initialization. | 234 // Minimum delay before sending financial ping after initialization. |
235 base::TimeDelta min_init_delay_; | 235 base::TimeDelta min_init_delay_; |
236 | 236 |
237 DISALLOW_COPY_AND_ASSIGN(RLZTracker); | 237 DISALLOW_COPY_AND_ASSIGN(RLZTracker); |
238 }; | 238 }; |
239 | 239 |
240 } // namespace rlz | 240 } // namespace rlz |
241 | 241 |
242 #endif // COMPONENTS_RLZ_RLZ_TRACKER_H_ | 242 #endif // COMPONENTS_RLZ_RLZ_TRACKER_H_ |
OLD | NEW |