Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: components/cronet/android/cronet_url_request_context_adapter.cc

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: address comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 } 387 }
388 388
389 bool OnCanSetCookie(const net::URLRequest& request, 389 bool OnCanSetCookie(const net::URLRequest& request,
390 const std::string& cookie_line, 390 const std::string& cookie_line,
391 net::CookieOptions* options) override { 391 net::CookieOptions* options) override {
392 // Disallow saving cookies by default. 392 // Disallow saving cookies by default.
393 return false; 393 return false;
394 } 394 }
395 395
396 bool OnCanAccessFile(const net::URLRequest& request, 396 bool OnCanAccessFile(const net::URLRequest& request,
397 const base::FilePath& path) const override { 397 const base::FilePath& original_path,
398 const base::FilePath& absolute_path) const override {
398 return false; 399 return false;
399 } 400 }
400 401
401 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); 402 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate);
402 }; 403 };
403 404
404 // Helper method that takes a Java string that can be null, in which case it 405 // Helper method that takes a Java string that can be null, in which case it
405 // will get converted to an empty string. 406 // will get converted to an empty string.
406 std::string ConvertNullableJavaStringToUTF8(JNIEnv* env, 407 std::string ConvertNullableJavaStringToUTF8(JNIEnv* env,
407 const JavaParamRef<jstring>& jstr) { 408 const JavaParamRef<jstring>& jstr) {
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 JNIEnv* env, 1175 JNIEnv* env,
1175 const JavaParamRef<jclass>& jcaller) { 1176 const JavaParamRef<jclass>& jcaller) {
1176 DCHECK(base::StatisticsRecorder::IsActive()); 1177 DCHECK(base::StatisticsRecorder::IsActive());
1177 std::vector<uint8_t> data; 1178 std::vector<uint8_t> data;
1178 if (!HistogramManager::GetInstance()->GetDeltas(&data)) 1179 if (!HistogramManager::GetInstance()->GetDeltas(&data))
1179 return ScopedJavaLocalRef<jbyteArray>(); 1180 return ScopedJavaLocalRef<jbyteArray>();
1180 return base::android::ToJavaByteArray(env, &data[0], data.size()); 1181 return base::android::ToJavaByteArray(env, &data[0], data.size());
1181 } 1182 }
1182 1183
1183 } // namespace cronet 1184 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698