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

Side by Side Diff: chrome/browser/extensions/api/instance_id/instance_id_api.h

Issue 1137463003: Support getting and deleting token for Instance ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch to land Created 5 years, 7 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 | « no previous file | chrome/browser/extensions/api/instance_id/instance_id_api.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_BROWSER_EXTENSIONS_API_INSTANCE_ID_INSTANCE_ID_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INSTANCE_ID_INSTANCE_ID_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_INSTANCE_ID_INSTANCE_ID_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_INSTANCE_ID_INSTANCE_ID_API_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/gcm_driver/instance_id/instance_id.h" 9 #include "components/gcm_driver/instance_id/instance_id.h"
10 #include "extensions/browser/extension_function.h" 10 #include "extensions/browser/extension_function.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 private: 86 private:
87 void GetTokenCompleted(const std::string& token, 87 void GetTokenCompleted(const std::string& token,
88 instance_id::InstanceID::Result result); 88 instance_id::InstanceID::Result result);
89 89
90 DISALLOW_COPY_AND_ASSIGN(InstanceIDGetTokenFunction); 90 DISALLOW_COPY_AND_ASSIGN(InstanceIDGetTokenFunction);
91 }; 91 };
92 92
93 class InstanceIDDeleteTokenFunction : public InstanceIDApiFunction { 93 class InstanceIDDeleteTokenFunction : public InstanceIDApiFunction {
94 public: 94 public:
95 DECLARE_EXTENSION_FUNCTION("instanceID.DeleteToken", INSTANCEID_DELETETOKEN); 95 DECLARE_EXTENSION_FUNCTION("instanceID.deleteToken", INSTANCEID_DELETETOKEN);
96 96
97 InstanceIDDeleteTokenFunction(); 97 InstanceIDDeleteTokenFunction();
98 98
99 protected: 99 protected:
100 ~InstanceIDDeleteTokenFunction() override; 100 ~InstanceIDDeleteTokenFunction() override;
101 101
102 // InstanceIDApiFunction: 102 // InstanceIDApiFunction:
103 ResponseAction DoWork() override; 103 ResponseAction DoWork() override;
104 104
105 private: 105 private:
(...skipping 17 matching lines...) Expand all
123 123
124 private: 124 private:
125 void DeleteIDCompleted(instance_id::InstanceID::Result result); 125 void DeleteIDCompleted(instance_id::InstanceID::Result result);
126 126
127 DISALLOW_COPY_AND_ASSIGN(InstanceIDDeleteIDFunction); 127 DISALLOW_COPY_AND_ASSIGN(InstanceIDDeleteIDFunction);
128 }; 128 };
129 129
130 } // namespace extensions 130 } // namespace extensions
131 131
132 #endif // CHROME_BROWSER_EXTENSIONS_API_INSTANCE_ID_INSTANCE_ID_API_H_ 132 #endif // CHROME_BROWSER_EXTENSIONS_API_INSTANCE_ID_INSTANCE_ID_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/instance_id/instance_id_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698