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

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

Issue 1126233004: Persist Instance ID data to GCM store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac 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 29 matching lines...) Expand all
40 40
41 InstanceIDGetIDFunction(); 41 InstanceIDGetIDFunction();
42 42
43 protected: 43 protected:
44 ~InstanceIDGetIDFunction() override; 44 ~InstanceIDGetIDFunction() override;
45 45
46 // InstanceIDApiFunction: 46 // InstanceIDApiFunction:
47 ResponseAction DoWork() override; 47 ResponseAction DoWork() override;
48 48
49 private: 49 private:
50 void GetIDCompleted(const std::string& id);
51
50 DISALLOW_COPY_AND_ASSIGN(InstanceIDGetIDFunction); 52 DISALLOW_COPY_AND_ASSIGN(InstanceIDGetIDFunction);
51 }; 53 };
52 54
53 class InstanceIDGetCreationTimeFunction : public InstanceIDApiFunction { 55 class InstanceIDGetCreationTimeFunction : public InstanceIDApiFunction {
54 public: 56 public:
55 DECLARE_EXTENSION_FUNCTION("instanceID.getCreationTime", 57 DECLARE_EXTENSION_FUNCTION("instanceID.getCreationTime",
56 INSTANCEID_GETCREATIONTIME); 58 INSTANCEID_GETCREATIONTIME);
57 59
58 InstanceIDGetCreationTimeFunction(); 60 InstanceIDGetCreationTimeFunction();
59 61
60 protected: 62 protected:
61 ~InstanceIDGetCreationTimeFunction() override; 63 ~InstanceIDGetCreationTimeFunction() override;
62 64
63 // InstanceIDApiFunction: 65 // InstanceIDApiFunction:
64 ResponseAction DoWork() override; 66 ResponseAction DoWork() override;
65 67
66 private: 68 private:
69 void GetCreationTimeCompleted(const base::Time& creation_time);
70
67 DISALLOW_COPY_AND_ASSIGN(InstanceIDGetCreationTimeFunction); 71 DISALLOW_COPY_AND_ASSIGN(InstanceIDGetCreationTimeFunction);
68 }; 72 };
69 73
70 class InstanceIDGetTokenFunction : public InstanceIDApiFunction { 74 class InstanceIDGetTokenFunction : public InstanceIDApiFunction {
71 public: 75 public:
72 DECLARE_EXTENSION_FUNCTION("instanceID.getToken", INSTANCEID_GETTOKEN); 76 DECLARE_EXTENSION_FUNCTION("instanceID.getToken", INSTANCEID_GETTOKEN);
73 77
74 InstanceIDGetTokenFunction(); 78 InstanceIDGetTokenFunction();
75 79
76 protected: 80 protected:
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 123
120 private: 124 private:
121 void DeleteIDCompleted(instance_id::InstanceID::Result result); 125 void DeleteIDCompleted(instance_id::InstanceID::Result result);
122 126
123 DISALLOW_COPY_AND_ASSIGN(InstanceIDDeleteIDFunction); 127 DISALLOW_COPY_AND_ASSIGN(InstanceIDDeleteIDFunction);
124 }; 128 };
125 129
126 } // namespace extensions 130 } // namespace extensions
127 131
128 #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