| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_SERVICES_GCM_GCM_PROFILE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_ | 6 #define CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 testing_delegate_ = testing_delegate; | 125 testing_delegate_ = testing_delegate; |
| 126 } | 126 } |
| 127 | 127 |
| 128 // Returns the user name if the profile is signed in. | 128 // Returns the user name if the profile is signed in. |
| 129 std::string SignedInUserName() const; | 129 std::string SignedInUserName() const; |
| 130 | 130 |
| 131 // Returns true if the gcm client is ready. | 131 // Returns true if the gcm client is ready. |
| 132 bool IsGCMClientReady() const; | 132 bool IsGCMClientReady() const; |
| 133 | 133 |
| 134 // Get GCM client internal states and statistics. If it has not been created | 134 // Get GCM client internal states and statistics. If it has not been created |
| 135 // then stats won't be modified. | 135 // then stats won't be modified. If clear_logs is true then activity logs will |
| 136 void RequestGCMStatistics(RequestGCMStatisticsCallback callback); | 136 // be cleared before the stats are returned. |
| 137 void RequestGCMStatistics(RequestGCMStatisticsCallback callback, |
| 138 bool clear_logs); |
| 139 |
| 140 // Enables/disables GCM activity recording, and then returns the stats. |
| 141 void SetGCMRecording(RequestGCMStatisticsCallback callback, bool recording); |
| 137 | 142 |
| 138 private: | 143 private: |
| 139 friend class GCMProfileServiceTestConsumer; | 144 friend class GCMProfileServiceTestConsumer; |
| 140 | 145 |
| 141 class DelayedTaskController; | 146 class DelayedTaskController; |
| 142 class IOWorker; | 147 class IOWorker; |
| 143 | 148 |
| 144 struct RegistrationInfo { | 149 struct RegistrationInfo { |
| 145 RegistrationInfo(); | 150 RegistrationInfo(); |
| 146 ~RegistrationInfo(); | 151 ~RegistrationInfo(); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 | 273 |
| 269 // Used to pass a weak pointer to the IO worker. | 274 // Used to pass a weak pointer to the IO worker. |
| 270 base::WeakPtrFactory<GCMProfileService> weak_ptr_factory_; | 275 base::WeakPtrFactory<GCMProfileService> weak_ptr_factory_; |
| 271 | 276 |
| 272 DISALLOW_COPY_AND_ASSIGN(GCMProfileService); | 277 DISALLOW_COPY_AND_ASSIGN(GCMProfileService); |
| 273 }; | 278 }; |
| 274 | 279 |
| 275 } // namespace gcm | 280 } // namespace gcm |
| 276 | 281 |
| 277 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_ | 282 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_ |
| OLD | NEW |