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

Side by Side Diff: google_apis/gcm/engine/checkin_request.h

Issue 378643002: [GCM] Check-in with signed in accounts associates device to user (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update to the code to prevent test crashes. Created 6 years, 5 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 | « components/gcm_driver/gcm_driver_desktop.cc ('k') | google_apis/gcm/engine/checkin_request.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ENGINE_CHECKIN_REQUEST_H_ 5 #ifndef GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_
6 #define GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ 6 #define GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 23 matching lines...) Expand all
34 public: 34 public:
35 // A callback function for the checkin request, accepting |checkin_response| 35 // A callback function for the checkin request, accepting |checkin_response|
36 // protobuf. 36 // protobuf.
37 typedef base::Callback<void(const checkin_proto::AndroidCheckinResponse& 37 typedef base::Callback<void(const checkin_proto::AndroidCheckinResponse&
38 checkin_response)> CheckinRequestCallback; 38 checkin_response)> CheckinRequestCallback;
39 39
40 // Checkin request details. 40 // Checkin request details.
41 struct GCM_EXPORT RequestInfo { 41 struct GCM_EXPORT RequestInfo {
42 RequestInfo(uint64 android_id, 42 RequestInfo(uint64 android_id,
43 uint64 security_token, 43 uint64 security_token,
44 const std::map<std::string, std::string>& account_tokens,
44 const std::string& settings_digest, 45 const std::string& settings_digest,
45 const checkin_proto::ChromeBuildProto& chrome_build_proto); 46 const checkin_proto::ChromeBuildProto& chrome_build_proto);
46 ~RequestInfo(); 47 ~RequestInfo();
47 48
48 // Android ID of the device. 49 // Android ID of the device.
49 uint64 android_id; 50 uint64 android_id;
50 // Security token of the device. 51 // Security token of the device.
51 uint64 security_token; 52 uint64 security_token;
53 // Map of account OAuth2 tokens keyed by emails.
54 std::map<std::string, std::string> account_tokens;
52 // Digest of GServices settings on the device. 55 // Digest of GServices settings on the device.
53 std::string settings_digest; 56 std::string settings_digest;
54 // Information of the Chrome build of this device. 57 // Information of the Chrome build of this device.
55 checkin_proto::ChromeBuildProto chrome_build_proto; 58 checkin_proto::ChromeBuildProto chrome_build_proto;
56 }; 59 };
57 60
58 CheckinRequest(const GURL& checkin_url, 61 CheckinRequest(const GURL& checkin_url,
59 const RequestInfo& request_info, 62 const RequestInfo& request_info,
60 const net::BackoffEntry::Policy& backoff_policy, 63 const net::BackoffEntry::Policy& backoff_policy,
61 const CheckinRequestCallback& callback, 64 const CheckinRequestCallback& callback,
(...skipping 24 matching lines...) Expand all
86 GCMStatsRecorder* recorder_; 89 GCMStatsRecorder* recorder_;
87 90
88 base::WeakPtrFactory<CheckinRequest> weak_ptr_factory_; 91 base::WeakPtrFactory<CheckinRequest> weak_ptr_factory_;
89 92
90 DISALLOW_COPY_AND_ASSIGN(CheckinRequest); 93 DISALLOW_COPY_AND_ASSIGN(CheckinRequest);
91 }; 94 };
92 95
93 } // namespace gcm 96 } // namespace gcm
94 97
95 #endif // GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_ 98 #endif // GOOGLE_APIS_GCM_ENGINE_CHECKIN_REQUEST_H_
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_driver_desktop.cc ('k') | google_apis/gcm/engine/checkin_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698