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

Side by Side Diff: extensions/shell/browser/shell_network_delegate.cc

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: disable checks in sub classes Created 3 years, 8 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 "extensions/shell/browser/shell_network_delegate.h" 5 #include "extensions/shell/browser/shell_network_delegate.h"
6 6
7 #include "content/public/browser/render_frame_host.h" 7 #include "content/public/browser/render_frame_host.h"
8 #include "content/public/browser/resource_request_info.h" 8 #include "content/public/browser/resource_request_info.h"
9 #include "extensions/browser/api/web_request/web_request_api.h" 9 #include "extensions/browser/api/web_request/web_request_api.h"
10 #include "extensions/browser/extension_system.h" 10 #include "extensions/browser/extension_system.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 net::URLRequest* request) { 102 net::URLRequest* request) {
103 ExtensionWebRequestEventRouter::GetInstance()->OnURLRequestDestroyed( 103 ExtensionWebRequestEventRouter::GetInstance()->OnURLRequestDestroyed(
104 browser_context_, request); 104 browser_context_, request);
105 } 105 }
106 106
107 void ShellNetworkDelegate::OnPACScriptError( 107 void ShellNetworkDelegate::OnPACScriptError(
108 int line_number, 108 int line_number,
109 const base::string16& error) { 109 const base::string16& error) {
110 } 110 }
111 111
112 bool ShellNetworkDelegate::OnCanAccessFile(
113 const net::URLRequest& request,
114 const base::FilePath& original_path,
115 const base::FilePath& absolute_path) const {
116 return true;
mmenke 2017/04/18 17:24:45 Why change behavior here?
satorux1 2017/04/19 07:22:22 Without this, extensions tests failed, because acc
satorux1 2017/04/21 06:35:10 this turned out to be no longer necessary, due to
117 }
118
112 net::NetworkDelegate::AuthRequiredResponse 119 net::NetworkDelegate::AuthRequiredResponse
113 ShellNetworkDelegate::OnAuthRequired( 120 ShellNetworkDelegate::OnAuthRequired(
114 net::URLRequest* request, 121 net::URLRequest* request,
115 const net::AuthChallengeInfo& auth_info, 122 const net::AuthChallengeInfo& auth_info,
116 const AuthCallback& callback, 123 const AuthCallback& callback,
117 net::AuthCredentials* credentials) { 124 net::AuthCredentials* credentials) {
118 return ExtensionWebRequestEventRouter::GetInstance()->OnAuthRequired( 125 return ExtensionWebRequestEventRouter::GetInstance()->OnAuthRequired(
119 browser_context_, extension_info_map_.get(), request, auth_info, callback, 126 browser_context_, extension_info_map_.get(), request, auth_info, callback,
120 credentials); 127 credentials);
121 } 128 }
122 129
123 } // namespace extensions 130 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698