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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 } | 390 } |
391 | 391 |
392 bool OnCanSetCookie(const net::URLRequest& request, | 392 bool OnCanSetCookie(const net::URLRequest& request, |
393 const std::string& cookie_line, | 393 const std::string& cookie_line, |
394 net::CookieOptions* options) override { | 394 net::CookieOptions* options) override { |
395 // Disallow saving cookies by default. | 395 // Disallow saving cookies by default. |
396 return false; | 396 return false; |
397 } | 397 } |
398 | 398 |
399 bool OnCanAccessFile(const net::URLRequest& request, | 399 bool OnCanAccessFile(const net::URLRequest& request, |
400 const base::FilePath& path) const override { | 400 const base::FilePath& original_path, |
| 401 const base::FilePath& absolute_path) const override { |
401 return false; | 402 return false; |
402 } | 403 } |
403 | 404 |
404 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); | 405 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); |
405 }; | 406 }; |
406 | 407 |
407 // Helper method that takes a Java string that can be null, in which case it | 408 // Helper method that takes a Java string that can be null, in which case it |
408 // will get converted to an empty string. | 409 // will get converted to an empty string. |
409 std::string ConvertNullableJavaStringToUTF8(JNIEnv* env, | 410 std::string ConvertNullableJavaStringToUTF8(JNIEnv* env, |
410 const JavaParamRef<jstring>& jstr) { | 411 const JavaParamRef<jstring>& jstr) { |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 JNIEnv* env, | 1209 JNIEnv* env, |
1209 const JavaParamRef<jclass>& jcaller) { | 1210 const JavaParamRef<jclass>& jcaller) { |
1210 DCHECK(base::StatisticsRecorder::IsActive()); | 1211 DCHECK(base::StatisticsRecorder::IsActive()); |
1211 std::vector<uint8_t> data; | 1212 std::vector<uint8_t> data; |
1212 if (!HistogramManager::GetInstance()->GetDeltas(&data)) | 1213 if (!HistogramManager::GetInstance()->GetDeltas(&data)) |
1213 return ScopedJavaLocalRef<jbyteArray>(); | 1214 return ScopedJavaLocalRef<jbyteArray>(); |
1214 return base::android::ToJavaByteArray(env, &data[0], data.size()); | 1215 return base::android::ToJavaByteArray(env, &data[0], data.size()); |
1215 } | 1216 } |
1216 | 1217 |
1217 } // namespace cronet | 1218 } // namespace cronet |
OLD | NEW |