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

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

Issue 445683003: [GCM] Exposing persistence of account mappings in GCM Driver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updates based on self review Created 6 years, 4 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 const GetGCMStatisticsCallback& callback, 122 const GetGCMStatisticsCallback& callback,
123 bool clear_logs) { 123 bool clear_logs) {
124 NOTIMPLEMENTED(); 124 NOTIMPLEMENTED();
125 } 125 }
126 126
127 void GCMDriverAndroid::SetGCMRecording(const GetGCMStatisticsCallback& callback, 127 void GCMDriverAndroid::SetGCMRecording(const GetGCMStatisticsCallback& callback,
128 bool recording) { 128 bool recording) {
129 NOTIMPLEMENTED(); 129 NOTIMPLEMENTED();
130 } 130 }
131 131
132 void GCMDriverAndroid::UpdateAccountMapping(
133 const AccountMapping& account_mapping) {
134 }
135
136 void GCMDriverAndroid::RemoveAccountMapping(const std::string& account_id) {
137 }
138
132 GCMClient::Result GCMDriverAndroid::EnsureStarted() { 139 GCMClient::Result GCMDriverAndroid::EnsureStarted() {
133 // TODO(johnme): Maybe we should check if GMS is available? 140 // TODO(johnme): Maybe we should check if GMS is available?
134 return GCMClient::SUCCESS; 141 return GCMClient::SUCCESS;
135 } 142 }
136 143
137 void GCMDriverAndroid::RegisterImpl( 144 void GCMDriverAndroid::RegisterImpl(
138 const std::string& app_id, 145 const std::string& app_id,
139 const std::vector<std::string>& sender_ids) { 146 const std::vector<std::string>& sender_ids) {
140 JNIEnv* env = AttachCurrentThread(); 147 JNIEnv* env = AttachCurrentThread();
141 Java_GCMDriver_register( 148 Java_GCMDriver_register(
142 env, java_ref_.obj(), 149 env, java_ref_.obj(),
143 ConvertUTF8ToJavaString(env, app_id).Release(), 150 ConvertUTF8ToJavaString(env, app_id).Release(),
144 ToJavaArrayOfStrings(env, sender_ids).obj()); 151 ToJavaArrayOfStrings(env, sender_ids).obj());
145 } 152 }
146 153
147 void GCMDriverAndroid::UnregisterImpl(const std::string& app_id) { 154 void GCMDriverAndroid::UnregisterImpl(const std::string& app_id) {
148 JNIEnv* env = AttachCurrentThread(); 155 JNIEnv* env = AttachCurrentThread();
149 Java_GCMDriver_unregister( 156 Java_GCMDriver_unregister(
150 env, java_ref_.obj(), 157 env, java_ref_.obj(),
151 ConvertUTF8ToJavaString(env, app_id).Release()); 158 ConvertUTF8ToJavaString(env, app_id).Release());
152 } 159 }
153 160
154 void GCMDriverAndroid::SendImpl(const std::string& app_id, 161 void GCMDriverAndroid::SendImpl(const std::string& app_id,
155 const std::string& receiver_id, 162 const std::string& receiver_id,
156 const GCMClient::OutgoingMessage& message) { 163 const GCMClient::OutgoingMessage& message) {
157 NOTIMPLEMENTED(); 164 NOTIMPLEMENTED();
158 } 165 }
159 166
160 } // namespace gcm 167 } // namespace gcm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698