| OLD | NEW |
| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return base::Time(); | 155 return base::Time(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 void GCMDriverAndroid::SetLastTokenFetchTime(const base::Time& time) { | 158 void GCMDriverAndroid::SetLastTokenFetchTime(const base::Time& time) { |
| 159 NOTIMPLEMENTED(); | 159 NOTIMPLEMENTED(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 void GCMDriverAndroid::WakeFromSuspendForHeartbeat(bool wake) { | 162 void GCMDriverAndroid::WakeFromSuspendForHeartbeat(bool wake) { |
| 163 } | 163 } |
| 164 | 164 |
| 165 InstanceIDStore* GCMDriverAndroid::GetInstanceIDStore() { |
| 166 // Not supported for Android. |
| 167 return NULL; |
| 168 } |
| 169 |
| 165 GCMClient::Result GCMDriverAndroid::EnsureStarted( | 170 GCMClient::Result GCMDriverAndroid::EnsureStarted( |
| 166 GCMClient::StartMode start_mode) { | 171 GCMClient::StartMode start_mode) { |
| 167 // TODO(johnme): Maybe we should check if GMS is available? | 172 // TODO(johnme): Maybe we should check if GMS is available? |
| 168 return GCMClient::SUCCESS; | 173 return GCMClient::SUCCESS; |
| 169 } | 174 } |
| 170 | 175 |
| 171 void GCMDriverAndroid::RegisterImpl( | 176 void GCMDriverAndroid::RegisterImpl( |
| 172 const std::string& app_id, const std::vector<std::string>& sender_ids) { | 177 const std::string& app_id, const std::vector<std::string>& sender_ids) { |
| 173 DCHECK_EQ(1u, sender_ids.size()); | 178 DCHECK_EQ(1u, sender_ids.size()); |
| 174 JNIEnv* env = AttachCurrentThread(); | 179 JNIEnv* env = AttachCurrentThread(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 191 ConvertUTF8ToJavaString(env, sender_id).Release()); | 196 ConvertUTF8ToJavaString(env, sender_id).Release()); |
| 192 } | 197 } |
| 193 | 198 |
| 194 void GCMDriverAndroid::SendImpl(const std::string& app_id, | 199 void GCMDriverAndroid::SendImpl(const std::string& app_id, |
| 195 const std::string& receiver_id, | 200 const std::string& receiver_id, |
| 196 const GCMClient::OutgoingMessage& message) { | 201 const GCMClient::OutgoingMessage& message) { |
| 197 NOTIMPLEMENTED(); | 202 NOTIMPLEMENTED(); |
| 198 } | 203 } |
| 199 | 204 |
| 200 } // namespace gcm | 205 } // namespace gcm |
| OLD | NEW |