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::OnRawBytesRead(const net::URLRequest
& request
,
56 void ShellNetworkDelegate::OnCompleted(net::URLRequest
* request
, bool started
) {
59 void ShellNetworkDelegate::OnURLRequestDestroyed(net::URLRequest
* request
) {
62 void ShellNetworkDelegate::OnPACScriptError(int line_number
,
63 const base::string16
& error
) {
66 ShellNetworkDelegate::AuthRequiredResponse
ShellNetworkDelegate::OnAuthRequired(
67 net::URLRequest
* request
,
68 const net::AuthChallengeInfo
& auth_info
,
69 const AuthCallback
& callback
,
70 net::AuthCredentials
* credentials
) {
71 return AUTH_REQUIRED_RESPONSE_NO_ACTION
;
74 bool ShellNetworkDelegate::OnCanGetCookies(const net::URLRequest
& request
,
75 const net::CookieList
& cookie_list
) {
79 bool ShellNetworkDelegate::OnCanSetCookie(const net::URLRequest
& request
,
80 const std::string
& cookie_line
,
81 net::CookieOptions
* options
) {
85 bool ShellNetworkDelegate::OnCanAccessFile(const net::URLRequest
& request
,
86 const base::FilePath
& path
) const {