| 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/cronet/android/cronet_url_request_context_adapter.h" | 5 #include "components/cronet/android/cronet_url_request_context_adapter.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 jint jlog_level) { | 1200 jint jlog_level) { |
| 1201 jint old_log_level = static_cast<jint>(logging::GetMinLogLevel()); | 1201 jint old_log_level = static_cast<jint>(logging::GetMinLogLevel()); |
| 1202 // MinLogLevel is global, shared by all URLRequestContexts. | 1202 // MinLogLevel is global, shared by all URLRequestContexts. |
| 1203 logging::SetMinLogLevel(static_cast<int>(jlog_level)); | 1203 logging::SetMinLogLevel(static_cast<int>(jlog_level)); |
| 1204 return old_log_level; | 1204 return old_log_level; |
| 1205 } | 1205 } |
| 1206 | 1206 |
| 1207 static ScopedJavaLocalRef<jbyteArray> GetHistogramDeltas( | 1207 static ScopedJavaLocalRef<jbyteArray> GetHistogramDeltas( |
| 1208 JNIEnv* env, | 1208 JNIEnv* env, |
| 1209 const JavaParamRef<jclass>& jcaller) { | 1209 const JavaParamRef<jclass>& jcaller) { |
| 1210 base::StatisticsRecorder::Initialize(); | 1210 DCHECK(base::StatisticsRecorder::IsActive()); |
| 1211 std::vector<uint8_t> data; | 1211 std::vector<uint8_t> data; |
| 1212 if (!HistogramManager::GetInstance()->GetDeltas(&data)) | 1212 if (!HistogramManager::GetInstance()->GetDeltas(&data)) |
| 1213 return ScopedJavaLocalRef<jbyteArray>(); | 1213 return ScopedJavaLocalRef<jbyteArray>(); |
| 1214 return base::android::ToJavaByteArray(env, &data[0], data.size()); | 1214 return base::android::ToJavaByteArray(env, &data[0], data.size()); |
| 1215 } | 1215 } |
| 1216 | 1216 |
| 1217 } // namespace cronet | 1217 } // namespace cronet |
| OLD | NEW |