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

Side by Side Diff: chrome/browser/services/gcm/gcm_profile_service.h

Issue 202083005: Add activity recording capability to gcm internals page. User can refresh, start/stop recording, an… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolving another merge conflict. Created 6 years, 9 months 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
OLDNEW
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // For testing purpose. 119 // For testing purpose.
120 GCMClient* GetGCMClientForTesting() const; 120 GCMClient* GetGCMClientForTesting() const;
121 121
122 // Returns the user name if the profile is signed in. 122 // Returns the user name if the profile is signed in.
123 std::string SignedInUserName() const; 123 std::string SignedInUserName() const;
124 124
125 // Returns true if the gcm client is ready. 125 // Returns true if the gcm client is ready.
126 bool IsGCMClientReady() const; 126 bool IsGCMClientReady() const;
127 127
128 // Get GCM client internal states and statistics. If it has not been created 128 // Get GCM client internal states and statistics. If it has not been created
129 // then stats won't be modified. 129 // then stats won't be modified. If clear_logs is true then activity logs will
130 void RequestGCMStatistics(RequestGCMStatisticsCallback callback); 130 // be cleared before the stats are returned.
131 void RequestGCMStatistics(RequestGCMStatisticsCallback callback,
132 bool clear_logs);
133
134 // Enables/disables GCM activity recording, and then returns the stats.
jianli 2014/03/26 20:17:18 When recording is stopped, do we need to return th
juyik 2014/03/26 20:57:32 The stats also contains snapshots (registered app
135 void SetGCMRecording(RequestGCMStatisticsCallback callback, bool recording);
131 136
132 private: 137 private:
133 friend class GCMProfileServiceTestConsumer; 138 friend class GCMProfileServiceTestConsumer;
134 139
135 class DelayedTaskController; 140 class DelayedTaskController;
136 class IOWorker; 141 class IOWorker;
137 142
138 typedef std::map<std::string, GCMAppHandler*> GCMAppHandlerMap; 143 typedef std::map<std::string, GCMAppHandler*> GCMAppHandlerMap;
139 144
140 // Overridden from content::NotificationObserver: 145 // Overridden from content::NotificationObserver:
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 238
234 // Used to pass a weak pointer to the IO worker. 239 // Used to pass a weak pointer to the IO worker.
235 base::WeakPtrFactory<GCMProfileService> weak_ptr_factory_; 240 base::WeakPtrFactory<GCMProfileService> weak_ptr_factory_;
236 241
237 DISALLOW_COPY_AND_ASSIGN(GCMProfileService); 242 DISALLOW_COPY_AND_ASSIGN(GCMProfileService);
238 }; 243 };
239 244
240 } // namespace gcm 245 } // namespace gcm
241 246
242 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_ 247 #endif // CHROME_BROWSER_SERVICES_GCM_GCM_PROFILE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698