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

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: Fix after sync 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
« no previous file with comments | « components/gcm_driver/gcm_driver_android.h ('k') | components/gcm_driver/gcm_driver_desktop.h » ('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 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::OnSignedIn() {
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 15 matching lines...) Expand all
120 const GetGCMStatisticsCallback& callback, 126 const GetGCMStatisticsCallback& callback,
121 bool clear_logs) { 127 bool clear_logs) {
122 NOTIMPLEMENTED(); 128 NOTIMPLEMENTED();
123 } 129 }
124 130
125 void GCMDriverAndroid::SetGCMRecording(const GetGCMStatisticsCallback& callback, 131 void GCMDriverAndroid::SetGCMRecording(const GetGCMStatisticsCallback& callback,
126 bool recording) { 132 bool recording) {
127 NOTIMPLEMENTED(); 133 NOTIMPLEMENTED();
128 } 134 }
129 135
130 std::string GCMDriverAndroid::SignedInUserName() const {
131 return std::string();
132 }
133
134 GCMClient::Result GCMDriverAndroid::EnsureStarted() { 136 GCMClient::Result GCMDriverAndroid::EnsureStarted() {
135 // TODO(johnme): Maybe we should check if GMS is available? 137 // TODO(johnme): Maybe we should check if GMS is available?
136 return GCMClient::SUCCESS; 138 return GCMClient::SUCCESS;
137 } 139 }
138 140
139 void GCMDriverAndroid::RegisterImpl( 141 void GCMDriverAndroid::RegisterImpl(
140 const std::string& app_id, 142 const std::string& app_id,
141 const std::vector<std::string>& sender_ids) { 143 const std::vector<std::string>& sender_ids) {
142 JNIEnv* env = AttachCurrentThread(); 144 JNIEnv* env = AttachCurrentThread();
143 Java_GCMDriver_register( 145 Java_GCMDriver_register(
144 env, java_ref_.obj(), 146 env, java_ref_.obj(),
145 ConvertUTF8ToJavaString(env, app_id).Release(), 147 ConvertUTF8ToJavaString(env, app_id).Release(),
146 ToJavaArrayOfStrings(env, sender_ids).obj()); 148 ToJavaArrayOfStrings(env, sender_ids).obj());
147 } 149 }
148 150
149 void GCMDriverAndroid::UnregisterImpl(const std::string& app_id) { 151 void GCMDriverAndroid::UnregisterImpl(const std::string& app_id) {
150 JNIEnv* env = AttachCurrentThread(); 152 JNIEnv* env = AttachCurrentThread();
151 Java_GCMDriver_unregister( 153 Java_GCMDriver_unregister(
152 env, java_ref_.obj(), 154 env, java_ref_.obj(),
153 ConvertUTF8ToJavaString(env, app_id).Release()); 155 ConvertUTF8ToJavaString(env, app_id).Release());
154 } 156 }
155 157
156 void GCMDriverAndroid::SendImpl(const std::string& app_id, 158 void GCMDriverAndroid::SendImpl(const std::string& app_id,
157 const std::string& receiver_id, 159 const std::string& receiver_id,
158 const GCMClient::OutgoingMessage& message) { 160 const GCMClient::OutgoingMessage& message) {
159 NOTIMPLEMENTED(); 161 NOTIMPLEMENTED();
160 } 162 }
161 163
162 } // namespace gcm 164 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_driver_android.h ('k') | components/gcm_driver/gcm_driver_desktop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698