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
3 // found in the LICENSE file.
5 #include "ios/web/shell/shell_network_delegate.h"
7 #include "net/base/net_errors.h"
11 ShellNetworkDelegate::ShellNetworkDelegate() {
14 ShellNetworkDelegate::~ShellNetworkDelegate() {
17 int ShellNetworkDelegate::OnBeforeURLRequest(
18 net::URLRequest
* request
,
19 const net::CompletionCallback
& callback
,
24 int ShellNetworkDelegate::OnBeforeSendHeaders(
25 net::URLRequest
* request
,
26 const net::CompletionCallback
& callback
,
27 net::HttpRequestHeaders
* headers
) {
31 void ShellNetworkDelegate::OnSendHeaders(
32 net::URLRequest
* request
,
33 const net::HttpRequestHeaders
& headers
) {
36 int ShellNetworkDelegate::OnHeadersReceived(
37 net::URLRequest
* request
,
38 const net::CompletionCallback
& callback
,
39 const net::HttpResponseHeaders
* original_response_headers
,
40 scoped_refptr
<net::HttpResponseHeaders
>* override_response_headers
,
41 GURL
* allowed_unsafe_redirect_url
) {
45 void ShellNetworkDelegate::OnBeforeRedirect(net::URLRequest
* request
,
46 const GURL
& new_location
) {
49 void ShellNetworkDelegate::OnResponseStarted(net::URLRequest
* request
) {
52 void ShellNetworkDelegate::OnCompleted(net::URLRequest
* request
, bool started
) {
55 void ShellNetworkDelegate::OnURLRequestDestroyed(net::URLRequest
* request
) {
58 void ShellNetworkDelegate::OnPACScriptError(int line_number
,
59 const base::string16
& error
) {
62 ShellNetworkDelegate::AuthRequiredResponse
ShellNetworkDelegate::OnAuthRequired(
63 net::URLRequest
* request
,
64 const net::AuthChallengeInfo
& auth_info
,
65 const AuthCallback
& callback
,
66 net::AuthCredentials
* credentials
) {
67 return AUTH_REQUIRED_RESPONSE_NO_ACTION
;
70 bool ShellNetworkDelegate::OnCanGetCookies(const net::URLRequest
& request
,
71 const net::CookieList
& cookie_list
) {
75 bool ShellNetworkDelegate::OnCanSetCookie(const net::URLRequest
& request
,
76 const std::string
& cookie_line
,
77 net::CookieOptions
* options
) {
81 bool ShellNetworkDelegate::OnCanAccessFile(const net::URLRequest
& request
,
82 const base::FilePath
& path
) const {