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

Side by Side Diff: components/gcm_driver/gcm_driver_android.cc

Issue 330733002: Move IdentityProvider usage from GCMDriverDesktop to GCMProfileService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 6 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 | Annotate | Revision Log
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 #include "components/gcm_driver/gcm_driver_android.h" 5 #include "components/gcm_driver/gcm_driver_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 std::string app_id = ConvertJavaStringToUTF8(env, j_app_id); 85 std::string app_id = ConvertJavaStringToUTF8(env, j_app_id);
86 86
87 GetAppHandler(app_id)->OnMessagesDeleted(app_id); 87 GetAppHandler(app_id)->OnMessagesDeleted(app_id);
88 } 88 }
89 89
90 // static 90 // static
91 bool GCMDriverAndroid::RegisterBindings(JNIEnv* env) { 91 bool GCMDriverAndroid::RegisterBindings(JNIEnv* env) {
92 return RegisterNativesImpl(env); 92 return RegisterNativesImpl(env);
93 } 93 }
94 94
95 void GCMDriverAndroid::SignIn() {
96 }
97
98 void GCMDriverAndroid::Purge() {
99 }
100
95 void GCMDriverAndroid::Enable() { 101 void GCMDriverAndroid::Enable() {
96 } 102 }
97 103
98 void GCMDriverAndroid::Disable() { 104 void GCMDriverAndroid::Disable() {
99 } 105 }
100 106
101 GCMClient* GCMDriverAndroid::GetGCMClientForTesting() const { 107 GCMClient* GCMDriverAndroid::GetGCMClientForTesting() const {
102 NOTIMPLEMENTED(); 108 NOTIMPLEMENTED();
103 return NULL; 109 return NULL;
104 } 110 }
(...skipping 10 matching lines...) Expand all
115 const GetGCMStatisticsCallback& callback, 121 const GetGCMStatisticsCallback& callback,
116 bool clear_logs) { 122 bool clear_logs) {
117 NOTIMPLEMENTED(); 123 NOTIMPLEMENTED();
118 } 124 }
119 125
120 void GCMDriverAndroid::SetGCMRecording(const GetGCMStatisticsCallback& callback, 126 void GCMDriverAndroid::SetGCMRecording(const GetGCMStatisticsCallback& callback,
121 bool recording) { 127 bool recording) {
122 NOTIMPLEMENTED(); 128 NOTIMPLEMENTED();
123 } 129 }
124 130
125 std::string GCMDriverAndroid::SignedInUserName() const {
126 return std::string();
127 }
128
129 GCMClient::Result GCMDriverAndroid::EnsureStarted() { 131 GCMClient::Result GCMDriverAndroid::EnsureStarted() {
130 // TODO(johnme): Maybe we should check if GMS is available? 132 // TODO(johnme): Maybe we should check if GMS is available?
131 return GCMClient::SUCCESS; 133 return GCMClient::SUCCESS;
132 } 134 }
133 135
134 void GCMDriverAndroid::RegisterImpl( 136 void GCMDriverAndroid::RegisterImpl(
135 const std::string& app_id, 137 const std::string& app_id,
136 const std::vector<std::string>& sender_ids) { 138 const std::vector<std::string>& sender_ids) {
137 JNIEnv* env = AttachCurrentThread(); 139 JNIEnv* env = AttachCurrentThread();
138 Java_GCMDriver_register( 140 Java_GCMDriver_register(
139 env, java_ref_.obj(), 141 env, java_ref_.obj(),
140 ConvertUTF8ToJavaString(env, app_id).Release(), 142 ConvertUTF8ToJavaString(env, app_id).Release(),
141 ToJavaArrayOfStrings(env, sender_ids).obj()); 143 ToJavaArrayOfStrings(env, sender_ids).obj());
142 } 144 }
143 145
144 void GCMDriverAndroid::UnregisterImpl(const std::string& app_id) { 146 void GCMDriverAndroid::UnregisterImpl(const std::string& app_id) {
145 JNIEnv* env = AttachCurrentThread(); 147 JNIEnv* env = AttachCurrentThread();
146 Java_GCMDriver_unregister( 148 Java_GCMDriver_unregister(
147 env, java_ref_.obj(), 149 env, java_ref_.obj(),
148 ConvertUTF8ToJavaString(env, app_id).Release()); 150 ConvertUTF8ToJavaString(env, app_id).Release());
149 } 151 }
150 152
151 void GCMDriverAndroid::SendImpl(const std::string& app_id, 153 void GCMDriverAndroid::SendImpl(const std::string& app_id,
152 const std::string& receiver_id, 154 const std::string& receiver_id,
153 const GCMClient::OutgoingMessage& message) { 155 const GCMClient::OutgoingMessage& message) {
154 NOTIMPLEMENTED(); 156 NOTIMPLEMENTED();
155 } 157 }
156 158
157 } // namespace gcm 159 } // namespace gcm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698