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

Side by Side Diff: trunk/src/google_apis/gcm/gcm_client.h

Issue 281783004: Revert 270226 "Componentize GCM Part 1: create GCM component and..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/google_apis/gcm/gcm.gyp ('k') | trunk/src/google_apis/gcm/gcm_client_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 GOOGLE_APIS_GCM_GCM_CLIENT_H_ 5 #ifndef GOOGLE_APIS_GCM_GCM_CLIENT_H_
6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_ 6 #define GOOGLE_APIS_GCM_GCM_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 12 matching lines...) Expand all
23 namespace checkin_proto { 23 namespace checkin_proto {
24 class ChromeBuildProto; 24 class ChromeBuildProto;
25 } 25 }
26 26
27 namespace net { 27 namespace net {
28 class URLRequestContextGetter; 28 class URLRequestContextGetter;
29 } 29 }
30 30
31 namespace gcm { 31 namespace gcm {
32 32
33 class Encryptor;
34
35 // Interface that encapsulates the network communications with the Google Cloud 33 // Interface that encapsulates the network communications with the Google Cloud
36 // Messaging server. This interface is not supposed to be thread-safe. 34 // Messaging server. This interface is not supposed to be thread-safe.
37 class GCM_EXPORT GCMClient { 35 class GCM_EXPORT GCMClient {
38 public: 36 public:
39 enum Result { 37 enum Result {
40 // Successful operation. 38 // Successful operation.
41 SUCCESS, 39 SUCCESS,
42 // Invalid parameter. 40 // Invalid parameter.
43 INVALID_PARAMETER, 41 INVALID_PARAMETER,
44 // Profile not signed in. 42 // Profile not signed in.
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // |url_request_context_getter|: for url requests. 176 // |url_request_context_getter|: for url requests.
179 // |delegate|: the delegate whose methods will be called asynchronously in 177 // |delegate|: the delegate whose methods will be called asynchronously in
180 // response to events and messages. 178 // response to events and messages.
181 virtual void Initialize( 179 virtual void Initialize(
182 const checkin_proto::ChromeBuildProto& chrome_build_proto, 180 const checkin_proto::ChromeBuildProto& chrome_build_proto,
183 const base::FilePath& store_path, 181 const base::FilePath& store_path,
184 const std::vector<std::string>& account_ids, 182 const std::vector<std::string>& account_ids,
185 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, 183 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner,
186 const scoped_refptr<net::URLRequestContextGetter>& 184 const scoped_refptr<net::URLRequestContextGetter>&
187 url_request_context_getter, 185 url_request_context_getter,
188 scoped_ptr<Encryptor> encryptor,
189 Delegate* delegate) = 0; 186 Delegate* delegate) = 0;
190 187
191 // Starts the GCM service by first loading the data from the persistent store. 188 // Starts the GCM service by first loading the data from the persistent store.
192 // This will then kick off the check-in if the check-in info is not found in 189 // This will then kick off the check-in if the check-in info is not found in
193 // the store. 190 // the store.
194 virtual void Start() = 0; 191 virtual void Start() = 0;
195 192
196 // Stops using the GCM service. This will not erase the persisted data. 193 // Stops using the GCM service. This will not erase the persisted data.
197 virtual void Stop() = 0; 194 virtual void Stop() = 0;
198 195
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // Clear all recorded GCM activity logs. 227 // Clear all recorded GCM activity logs.
231 virtual void ClearActivityLogs() = 0; 228 virtual void ClearActivityLogs() = 0;
232 229
233 // Gets internal states and statistics. 230 // Gets internal states and statistics.
234 virtual GCMStatistics GetStatistics() const = 0; 231 virtual GCMStatistics GetStatistics() const = 0;
235 }; 232 };
236 233
237 } // namespace gcm 234 } // namespace gcm
238 235
239 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ 236 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_
OLDNEW
« no previous file with comments | « trunk/src/google_apis/gcm/gcm.gyp ('k') | trunk/src/google_apis/gcm/gcm_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698