| 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 "chrome/browser/android/net/external_estimate_provider_android.h" | 5 #include "chrome/browser/android/net/external_estimate_provider_android.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/android/context_utils.h" | 9 #include "base/android/context_utils.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 13 #include "jni/ExternalEstimateProviderAndroid_jni.h" | 13 #include "jni/ExternalEstimateProviderAndroid_jni.h" |
| 14 | 14 |
| 15 using base::android::JavaParamRef; |
| 16 |
| 15 namespace chrome { | 17 namespace chrome { |
| 16 namespace android { | 18 namespace android { |
| 17 | 19 |
| 18 ExternalEstimateProviderAndroid::ExternalEstimateProviderAndroid() | 20 ExternalEstimateProviderAndroid::ExternalEstimateProviderAndroid() |
| 19 : task_runner_(nullptr), | 21 : task_runner_(nullptr), |
| 20 delegate_(nullptr), | 22 delegate_(nullptr), |
| 21 weak_factory_(this) { | 23 weak_factory_(this) { |
| 22 if (base::ThreadTaskRunnerHandle::IsSet()) | 24 if (base::ThreadTaskRunnerHandle::IsSet()) |
| 23 task_runner_ = base::ThreadTaskRunnerHandle::Get(); | 25 task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
| 24 JNIEnv* env = base::android::AttachCurrentThread(); | 26 JNIEnv* env = base::android::AttachCurrentThread(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 upstream_throughput_kbps); | 145 upstream_throughput_kbps); |
| 144 } | 146 } |
| 145 } | 147 } |
| 146 | 148 |
| 147 bool RegisterExternalEstimateProviderAndroid(JNIEnv* env) { | 149 bool RegisterExternalEstimateProviderAndroid(JNIEnv* env) { |
| 148 return RegisterNativesImpl(env); | 150 return RegisterNativesImpl(env); |
| 149 } | 151 } |
| 150 | 152 |
| 151 } // namespace android | 153 } // namespace android |
| 152 } // namespace chrome | 154 } // namespace chrome |
| OLD | NEW |