| OLD | NEW |
| 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 #include "components/gcm_driver/instance_id/instance_id_android.h" | 5 #include "components/gcm_driver/instance_id/instance_id_android.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/android/context_utils.h" | 11 #include "base/android/context_utils.h" |
| 12 #include "base/android/jni_android.h" | 12 #include "base/android/jni_android.h" |
| 13 #include "base/android/jni_array.h" | 13 #include "base/android/jni_array.h" |
| 14 #include "base/android/jni_string.h" | 14 #include "base/android/jni_string.h" |
| 15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/location.h" | 16 #include "base/location.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/memory/ptr_util.h" | 18 #include "base/memory/ptr_util.h" |
| 19 #include "base/thread_task_runner_handle.h" | 19 #include "base/threading/thread_task_runner_handle.h" |
| 20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
| 21 #include "jni/InstanceIDBridge_jni.h" | 21 #include "jni/InstanceIDBridge_jni.h" |
| 22 | 22 |
| 23 using base::android::AttachCurrentThread; | 23 using base::android::AttachCurrentThread; |
| 24 using base::android::ConvertJavaStringToUTF8; | 24 using base::android::ConvertJavaStringToUTF8; |
| 25 using base::android::ConvertUTF8ToJavaString; | 25 using base::android::ConvertUTF8ToJavaString; |
| 26 | 26 |
| 27 namespace instance_id { | 27 namespace instance_id { |
| 28 | 28 |
| 29 InstanceIDAndroid::ScopedBlockOnAsyncTasksForTesting:: | 29 InstanceIDAndroid::ScopedBlockOnAsyncTasksForTesting:: |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 jboolean success) { | 211 jboolean success) { |
| 212 DCHECK(thread_checker_.CalledOnValidThread()); | 212 DCHECK(thread_checker_.CalledOnValidThread()); |
| 213 | 213 |
| 214 DeleteIDCallback* callback = delete_id_callbacks_.Lookup(request_id); | 214 DeleteIDCallback* callback = delete_id_callbacks_.Lookup(request_id); |
| 215 DCHECK(callback); | 215 DCHECK(callback); |
| 216 callback->Run(success ? InstanceID::SUCCESS : InstanceID::UNKNOWN_ERROR); | 216 callback->Run(success ? InstanceID::SUCCESS : InstanceID::UNKNOWN_ERROR); |
| 217 delete_id_callbacks_.Remove(request_id); | 217 delete_id_callbacks_.Remove(request_id); |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace instance_id | 220 } // namespace instance_id |
| OLD | NEW |