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

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 most of peter's concerns Created 4 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
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 // 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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698