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

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: Remove channel from product_category_for_subtypes, and 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
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,
52 const std::string& authorized_entity, 48 const std::string& authorized_entity,
53 const std::string& scope, 49 const std::string& scope,
54 const std::map<std::string, std::string>& options, 50 const std::map<std::string, std::string>& options,
55 const GetTokenCallback& callback) = 0; 51 const GetTokenCallback& callback) = 0;
56 virtual void DeleteToken(const std::string& app_id, 52 virtual void DeleteToken(const std::string& app_id,
57 const std::string& authorized_entity, 53 const std::string& authorized_entity,
58 const std::string& scope, 54 const std::string& scope,
59 const DeleteTokenCallback& callback) = 0; 55 const DeleteTokenCallback& callback) = 0;
56 void DeleteAllTokensForApp(const std::string& app_id,
57 const DeleteTokenCallback& callback);
60 58
61 // Persistence support. 59 // Persistence support.
62 virtual void AddInstanceIDData(const std::string& app_id, 60 virtual void AddInstanceIDData(const std::string& app_id,
63 const std::string& instance_id, 61 const std::string& instance_id,
64 const std::string& extra_data) = 0; 62 const std::string& extra_data) = 0;
65 virtual void RemoveInstanceIDData(const std::string& app_id) = 0; 63 virtual void RemoveInstanceIDData(const std::string& app_id) = 0;
66 virtual void GetInstanceIDData( 64 virtual void GetInstanceIDData(
67 const std::string& app_id, 65 const std::string& app_id,
68 const GetInstanceIDDataCallback& callback) = 0; 66 const GetInstanceIDDataCallback& callback) = 0;
69 67
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 DefaultGCMAppHandler default_app_handler_; 336 DefaultGCMAppHandler default_app_handler_;
339 337
340 base::WeakPtrFactory<GCMDriver> weak_ptr_factory_; 338 base::WeakPtrFactory<GCMDriver> weak_ptr_factory_;
341 339
342 DISALLOW_COPY_AND_ASSIGN(GCMDriver); 340 DISALLOW_COPY_AND_ASSIGN(GCMDriver);
343 }; 341 };
344 342
345 } // namespace gcm 343 } // namespace gcm
346 344
347 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ 345 #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_desktop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698