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

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

Issue 183013007: [GCM] Stop/restart GCM when the state is forced off/on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land 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 | Annotate | Revision Log
« no previous file with comments | « google_apis/gcm/engine/gcm_store_impl_unittest.cc ('k') | 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 const checkin_proto::ChromeBuildProto& chrome_build_proto, 146 const checkin_proto::ChromeBuildProto& chrome_build_proto,
147 const base::FilePath& store_path, 147 const base::FilePath& store_path,
148 const std::vector<std::string>& account_ids, 148 const std::vector<std::string>& account_ids,
149 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner, 149 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner,
150 const scoped_refptr<net::URLRequestContextGetter>& 150 const scoped_refptr<net::URLRequestContextGetter>&
151 url_request_context_getter, 151 url_request_context_getter,
152 Delegate* delegate) = 0; 152 Delegate* delegate) = 0;
153 153
154 // Loads the data from the persistent store. This will automatically kick off 154 // Loads the data from the persistent store. This will automatically kick off
155 // the check-in if the check-in info is not found in the store. 155 // the check-in if the check-in info is not found in the store.
156 // TODO(jianli): consider renaming this name to Start.
156 virtual void Load() = 0; 157 virtual void Load() = 0;
157 158
159 // Stops using the GCM service. This will not erase the persisted data.
160 virtual void Stop() = 0;
161
158 // Checks out of the GCM service. This will erase all the cached and persisted 162 // Checks out of the GCM service. This will erase all the cached and persisted
159 // data. 163 // data.
160 virtual void CheckOut() = 0; 164 virtual void CheckOut() = 0;
161 165
162 // Registers the application for GCM. Delegate::OnRegisterFinished will be 166 // Registers the application for GCM. Delegate::OnRegisterFinished will be
163 // called asynchronously upon completion. 167 // called asynchronously upon completion.
164 // |app_id|: application ID. 168 // |app_id|: application ID.
165 // |cert|: SHA-1 of public key of the application, in base16 format. 169 // |cert|: SHA-1 of public key of the application, in base16 format.
166 // |sender_ids|: list of IDs of the servers that are allowed to send the 170 // |sender_ids|: list of IDs of the servers that are allowed to send the
167 // messages to the application. These IDs are assigned by the 171 // messages to the application. These IDs are assigned by the
(...skipping 14 matching lines...) Expand all
182 // |receiver_id|: registration ID of the receiver party. 186 // |receiver_id|: registration ID of the receiver party.
183 // |message|: message to be sent. 187 // |message|: message to be sent.
184 virtual void Send(const std::string& app_id, 188 virtual void Send(const std::string& app_id,
185 const std::string& receiver_id, 189 const std::string& receiver_id,
186 const OutgoingMessage& message) = 0; 190 const OutgoingMessage& message) = 0;
187 }; 191 };
188 192
189 } // namespace gcm 193 } // namespace gcm
190 194
191 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ 195 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/gcm_store_impl_unittest.cc ('k') | google_apis/gcm/gcm_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698