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

Side by Side Diff: components/gcm_driver/gcm_driver.h

Issue 2111973002: Add support for GCM subtypes to desktop Instance ID implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid9push
Patch Set: Address nits Created 4 years, 4 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
« no previous file with comments | « components/gcm_driver/gcm_desktop_utils.cc ('k') | components/gcm_driver/gcm_driver.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 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
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 void DeleteAllTokensForApp(const std::string& app_id,
59 bool use_subtype,
60 const DeleteTokenCallback& callback);
60 61
61 // Persistence support. 62 // Persistence support.
62 virtual void AddInstanceIDData(const std::string& app_id, 63 virtual void AddInstanceIDData(const std::string& app_id,
63 const std::string& instance_id, 64 const std::string& instance_id,
64 const std::string& extra_data) = 0; 65 const std::string& extra_data) = 0;
65 virtual void RemoveInstanceIDData(const std::string& app_id) = 0; 66 virtual void RemoveInstanceIDData(const std::string& app_id) = 0;
66 virtual void GetInstanceIDData( 67 virtual void GetInstanceIDData(
67 const std::string& app_id, 68 const std::string& app_id,
68 const GetInstanceIDDataCallback& callback) = 0; 69 const GetInstanceIDDataCallback& callback) = 0;
69 70
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 DefaultGCMAppHandler default_app_handler_; 339 DefaultGCMAppHandler default_app_handler_;
339 340
340 base::WeakPtrFactory<GCMDriver> weak_ptr_factory_; 341 base::WeakPtrFactory<GCMDriver> weak_ptr_factory_;
341 342
342 DISALLOW_COPY_AND_ASSIGN(GCMDriver); 343 DISALLOW_COPY_AND_ASSIGN(GCMDriver);
343 }; 344 };
344 345
345 } // namespace gcm 346 } // namespace gcm
346 347
347 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 348 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_desktop_utils.cc ('k') | components/gcm_driver/gcm_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698