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

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

Issue 1923953002: Integrate InstanceID with GCM crypto provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid5default
Patch Set: RunUntilIdle after deleting GCMDriver Created 4 years, 6 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 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 COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_
6 #define COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_ 6 #define COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 22 matching lines...) Expand all
33 ~ScopedBlockOnAsyncTasksForTesting(); 33 ~ScopedBlockOnAsyncTasksForTesting();
34 34
35 private: 35 private:
36 bool previous_value_; 36 bool previous_value_;
37 DISALLOW_COPY_AND_ASSIGN(ScopedBlockOnAsyncTasksForTesting); 37 DISALLOW_COPY_AND_ASSIGN(ScopedBlockOnAsyncTasksForTesting);
38 }; 38 };
39 39
40 // Register JNI methods. 40 // Register JNI methods.
41 static bool RegisterJni(JNIEnv* env); 41 static bool RegisterJni(JNIEnv* env);
42 42
43 InstanceIDAndroid(const std::string& app_id); 43 InstanceIDAndroid(const std::string& app_id, gcm::GCMDriver* gcm_driver);
44 ~InstanceIDAndroid() override; 44 ~InstanceIDAndroid() override;
45 45
46 // InstanceID implementation: 46 // InstanceID implementation:
47 void GetID(const GetIDCallback& callback) override; 47 void GetID(const GetIDCallback& callback) override;
48 void GetCreationTime(const GetCreationTimeCallback& callback) override; 48 void GetCreationTime(const GetCreationTimeCallback& callback) override;
49 void GetToken(const std::string& audience, 49 void GetToken(const std::string& audience,
50 const std::string& scope, 50 const std::string& scope,
51 const std::map<std::string, std::string>& options, 51 const std::map<std::string, std::string>& options,
52 const GetTokenCallback& callback) override; 52 const GetTokenCallback& callback) override;
53 void DeleteToken(const std::string& audience, 53 void DeleteTokenImpl(const std::string& audience,
54 const std::string& scope, 54 const std::string& scope,
55 const DeleteTokenCallback& callback) override; 55 const DeleteTokenCallback& callback) override;
56 void DeleteID(const DeleteIDCallback& callback) override; 56 void DeleteIDImpl(const DeleteIDCallback& callback) override;
57 57
58 // Methods called from Java via JNI: 58 // Methods called from Java via JNI:
59 void DidGetID(JNIEnv* env, 59 void DidGetID(JNIEnv* env,
60 const base::android::JavaParamRef<jobject>& obj, 60 const base::android::JavaParamRef<jobject>& obj,
61 jint request_id, 61 jint request_id,
62 const base::android::JavaParamRef<jstring>& jid); 62 const base::android::JavaParamRef<jstring>& jid);
63 void DidGetCreationTime(JNIEnv* env, 63 void DidGetCreationTime(JNIEnv* env,
64 const base::android::JavaParamRef<jobject>& obj, 64 const base::android::JavaParamRef<jobject>& obj,
65 jint request_id, 65 jint request_id,
66 jlong creation_time_unix_ms); 66 jlong creation_time_unix_ms);
(...skipping 20 matching lines...) Expand all
87 IDMap<DeleteIDCallback, IDMapOwnPointer> delete_id_callbacks_; 87 IDMap<DeleteIDCallback, IDMapOwnPointer> delete_id_callbacks_;
88 88
89 base::ThreadChecker thread_checker_; 89 base::ThreadChecker thread_checker_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(InstanceIDAndroid); 91 DISALLOW_COPY_AND_ASSIGN(InstanceIDAndroid);
92 }; 92 };
93 93
94 } // namespace instance_id 94 } // namespace instance_id
95 95
96 #endif // COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_ 96 #endif // COMPONENTS_GCM_DRIVER_INSTANCE_ID_INSTANCE_ID_ANDROID_H_
OLDNEW
« no previous file with comments | « components/gcm_driver/instance_id/instance_id.cc ('k') | components/gcm_driver/instance_id/instance_id_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698