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_DRIVER_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 25 matching lines...) Expand all Loading... | |
36 typedef base::Callback<void(const std::string& token, | 36 typedef base::Callback<void(const std::string& token, |
37 GCMClient::Result result)> GetTokenCallback; | 37 GCMClient::Result result)> GetTokenCallback; |
38 typedef base::Callback<void(GCMClient::Result result)> DeleteTokenCallback; | 38 typedef base::Callback<void(GCMClient::Result result)> DeleteTokenCallback; |
39 typedef base::Callback<void(const std::string& instance_id, | 39 typedef base::Callback<void(const std::string& instance_id, |
40 const std::string& extra_data)> | 40 const std::string& extra_data)> |
41 GetInstanceIDDataCallback; | 41 GetInstanceIDDataCallback; |
42 | 42 |
43 InstanceIDHandler(); | 43 InstanceIDHandler(); |
44 virtual ~InstanceIDHandler(); | 44 virtual ~InstanceIDHandler(); |
45 | 45 |
46 // Delete all tokens assoicated with |app_id|. | |
47 void DeleteAllTokensForApp(const std::string& app_id, | |
48 const DeleteTokenCallback& callback); | |
49 | |
50 // Token service. | 46 // Token service. |
51 virtual void GetToken(const std::string& app_id, | 47 virtual void GetToken(const std::string& app_id, |
48 bool use_subtype, | |
52 const std::string& authorized_entity, | 49 const std::string& authorized_entity, |
53 const std::string& scope, | 50 const std::string& scope, |
54 const std::map<std::string, std::string>& options, | 51 const std::map<std::string, std::string>& options, |
55 const GetTokenCallback& callback) = 0; | 52 const GetTokenCallback& callback) = 0; |
56 virtual void DeleteToken(const std::string& app_id, | 53 virtual void DeleteToken(const std::string& app_id, |
54 bool use_subtype, | |
57 const std::string& authorized_entity, | 55 const std::string& authorized_entity, |
58 const std::string& scope, | 56 const std::string& scope, |
59 const DeleteTokenCallback& callback) = 0; | 57 const DeleteTokenCallback& callback) = 0; |
58 // Delete all tokens assoicated with |app_id|. | |
Peter Beverloo
2016/07/22 12:17:03
nit: Delete comment, the name is clear enough.
johnme
2016/07/26 17:11:56
Done.
| |
59 void DeleteAllTokensForApp(const std::string& app_id, | |
60 bool use_subtype, | |
61 const DeleteTokenCallback& callback); | |
60 | 62 |
61 // Persistence support. | 63 // Persistence support. |
62 virtual void AddInstanceIDData(const std::string& app_id, | 64 virtual void AddInstanceIDData(const std::string& app_id, |
63 const std::string& instance_id, | 65 const std::string& instance_id, |
64 const std::string& extra_data) = 0; | 66 const std::string& extra_data) = 0; |
65 virtual void RemoveInstanceIDData(const std::string& app_id) = 0; | 67 virtual void RemoveInstanceIDData(const std::string& app_id) = 0; |
66 virtual void GetInstanceIDData( | 68 virtual void GetInstanceIDData( |
67 const std::string& app_id, | 69 const std::string& app_id, |
68 const GetInstanceIDDataCallback& callback) = 0; | 70 const GetInstanceIDDataCallback& callback) = 0; |
69 | 71 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
338 DefaultGCMAppHandler default_app_handler_; | 340 DefaultGCMAppHandler default_app_handler_; |
339 | 341 |
340 base::WeakPtrFactory<GCMDriver> weak_ptr_factory_; | 342 base::WeakPtrFactory<GCMDriver> weak_ptr_factory_; |
341 | 343 |
342 DISALLOW_COPY_AND_ASSIGN(GCMDriver); | 344 DISALLOW_COPY_AND_ASSIGN(GCMDriver); |
343 }; | 345 }; |
344 | 346 |
345 } // namespace gcm | 347 } // namespace gcm |
346 | 348 |
347 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ | 349 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
OLD | NEW |