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

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

Issue 167063004: [GCM] Move the manifest key checking logic to gcm.register function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
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 22 matching lines...) Expand all
33 // Messaging server. This interface is not supposed to be thread-safe. 33 // Messaging server. This interface is not supposed to be thread-safe.
34 class GCM_EXPORT GCMClient { 34 class GCM_EXPORT GCMClient {
35 public: 35 public:
36 enum Result { 36 enum Result {
37 // Successful operation. 37 // Successful operation.
38 SUCCESS, 38 SUCCESS,
39 // Invalid parameter. 39 // Invalid parameter.
40 INVALID_PARAMETER, 40 INVALID_PARAMETER,
41 // Profile not signed in. 41 // Profile not signed in.
42 NOT_SIGNED_IN, 42 NOT_SIGNED_IN,
43 // Key was missing in the manifest. The register operation requires a key.
44 MANIFEST_KEY_MISSING,
fgorski 2014/02/14 22:34:28 I am a little sceptical about putting it here, as
jianli 2014/02/14 22:47:26 Done.
43 // Previous asynchronous operation is still pending to finish. Certain 45 // Previous asynchronous operation is still pending to finish. Certain
44 // operation, like register, is only allowed one at a time. 46 // operation, like register, is only allowed one at a time.
45 ASYNC_OPERATION_PENDING, 47 ASYNC_OPERATION_PENDING,
46 // Network socket error. 48 // Network socket error.
47 NETWORK_ERROR, 49 NETWORK_ERROR,
48 // Problem at the server. 50 // Problem at the server.
49 SERVER_ERROR, 51 SERVER_ERROR,
50 // Exceeded the specified TTL during message sending. 52 // Exceeded the specified TTL during message sending.
51 TTL_EXCEEDED, 53 TTL_EXCEEDED,
52 // Other errors. 54 // Other errors.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 const std::string& receiver_id, 171 const std::string& receiver_id,
170 const OutgoingMessage& message) = 0; 172 const OutgoingMessage& message) = 0;
171 173
172 // Returns true if GCM becomes ready. 174 // Returns true if GCM becomes ready.
173 virtual bool IsReady() const = 0; 175 virtual bool IsReady() const = 0;
174 }; 176 };
175 177
176 } // namespace gcm 178 } // namespace gcm
177 179
178 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_ 180 #endif // GOOGLE_APIS_GCM_GCM_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698