OLD | NEW |
---|---|
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 COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 CHANNEL_UNKNOWN | 91 CHANNEL_UNKNOWN |
92 }; | 92 }; |
93 | 93 |
94 struct ChromeBuildInfo { | 94 struct ChromeBuildInfo { |
95 ChromeBuildInfo(); | 95 ChromeBuildInfo(); |
96 ~ChromeBuildInfo(); | 96 ~ChromeBuildInfo(); |
97 | 97 |
98 ChromePlatform platform; | 98 ChromePlatform platform; |
99 ChromeChannel channel; | 99 ChromeChannel channel; |
100 std::string version; | 100 std::string version; |
101 std::string category_for_subtypes; | |
101 }; | 102 }; |
102 | 103 |
103 // Detailed information of the Send Error event. | 104 // Detailed information of the Send Error event. |
104 struct SendErrorDetails { | 105 struct SendErrorDetails { |
105 SendErrorDetails(); | 106 SendErrorDetails(); |
106 SendErrorDetails(const SendErrorDetails& other); | 107 SendErrorDetails(const SendErrorDetails& other); |
107 ~SendErrorDetails(); | 108 ~SendErrorDetails(); |
108 | 109 |
109 std::string message_id; | 110 std::string message_id; |
110 MessageData additional_data; | 111 MessageData additional_data; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
311 | 312 |
312 // Removes the Instance ID data for a specific app from the persistent store. | 313 // Removes the Instance ID data for a specific app from the persistent store. |
313 virtual void RemoveInstanceIDData(const std::string& app_id) = 0; | 314 virtual void RemoveInstanceIDData(const std::string& app_id) = 0; |
314 | 315 |
315 // Retrieves the Instance ID data for a specific app from the persistent | 316 // Retrieves the Instance ID data for a specific app from the persistent |
316 // store. | 317 // store. |
317 virtual void GetInstanceIDData(const std::string& app_id, | 318 virtual void GetInstanceIDData(const std::string& app_id, |
318 std::string* instance_id, | 319 std::string* instance_id, |
319 std::string* extra_data) = 0; | 320 std::string* extra_data) = 0; |
320 | 321 |
322 // Returns whether this is the special category used for Instance IDs sending | |
323 // their |app_id| to GCM as a "subtype" (see security note at implementation). | |
324 virtual bool CategoryHasSubtype(const std::string& category) = 0; | |
Peter Beverloo
2016/07/22 12:17:03
What's the benefit of keeping the ambiguously name
johnme
2016/07/26 17:11:55
Fair. I've inlined this into GCMClientImpl::Handle
| |
325 | |
321 // Gets and sets custom heartbeat interval for the MCS connection. | 326 // Gets and sets custom heartbeat interval for the MCS connection. |
322 // |scope| is used to identify the component that requests a custom interval | 327 // |scope| is used to identify the component that requests a custom interval |
323 // to be set, and allows that component to later revoke the setting. It should | 328 // to be set, and allows that component to later revoke the setting. It should |
324 // be unique. | 329 // be unique. |
325 virtual void AddHeartbeatInterval(const std::string& scope, | 330 virtual void AddHeartbeatInterval(const std::string& scope, |
326 int interval_ms) = 0; | 331 int interval_ms) = 0; |
327 virtual void RemoveHeartbeatInterval(const std::string& scope) = 0; | 332 virtual void RemoveHeartbeatInterval(const std::string& scope) = 0; |
328 }; | 333 }; |
329 | 334 |
330 } // namespace gcm | 335 } // namespace gcm |
331 | 336 |
332 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ | 337 #endif // COMPONENTS_GCM_DRIVER_GCM_CLIENT_H_ |
OLD | NEW |