Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / net / base / network_delegate_impl.cc
blob3cc8c2196c965dbd52e42ffcfdbff05448c95d01
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 "net/base/network_delegate_impl.h"
7 #include "net/base/net_errors.h"
9 namespace net {
11 int NetworkDelegateImpl::OnBeforeURLRequest(URLRequest* request,
12 const CompletionCallback& callback,
13 GURL* new_url) {
14 return OK;
17 void NetworkDelegateImpl::OnResolveProxy(const GURL& url,
18 int load_flags,
19 const ProxyService& proxy_service,
20 ProxyInfo* result) {
23 void NetworkDelegateImpl::OnProxyFallback(const ProxyServer& bad_proxy,
24 int net_error) {
27 int NetworkDelegateImpl::OnBeforeSendHeaders(URLRequest* request,
28 const CompletionCallback& callback,
29 HttpRequestHeaders* headers) {
30 return OK;
33 void NetworkDelegateImpl::OnBeforeSendProxyHeaders(
34 URLRequest* request,
35 const ProxyInfo& proxy_info,
36 HttpRequestHeaders* headers) {
39 void NetworkDelegateImpl::OnSendHeaders(URLRequest* request,
40 const HttpRequestHeaders& headers) {
43 int NetworkDelegateImpl::OnHeadersReceived(
44 URLRequest* request,
45 const CompletionCallback& callback,
46 const HttpResponseHeaders* original_response_headers,
47 scoped_refptr<HttpResponseHeaders>* override_response_headers,
48 GURL* allowed_unsafe_redirect_url) {
49 return OK;
52 void NetworkDelegateImpl::OnBeforeRedirect(URLRequest* request,
53 const GURL& new_location) {
56 void NetworkDelegateImpl::OnResponseStarted(URLRequest* request) {
59 void NetworkDelegateImpl::OnNetworkBytesReceived(const URLRequest& request,
60 int64_t bytes_received) {}
62 void NetworkDelegateImpl::OnCompleted(URLRequest* request, bool started) {
65 void NetworkDelegateImpl::OnURLRequestDestroyed(URLRequest* request) {
68 void NetworkDelegateImpl::OnURLRequestJobOrphaned(URLRequest* request) {}
70 void NetworkDelegateImpl::OnPACScriptError(int line_number,
71 const base::string16& error) {
74 NetworkDelegate::AuthRequiredResponse NetworkDelegateImpl::OnAuthRequired(
75 URLRequest* request,
76 const AuthChallengeInfo& auth_info,
77 const AuthCallback& callback,
78 AuthCredentials* credentials) {
79 return AUTH_REQUIRED_RESPONSE_NO_ACTION;
82 bool NetworkDelegateImpl::OnCanGetCookies(const URLRequest& request,
83 const CookieList& cookie_list) {
84 return true;
87 bool NetworkDelegateImpl::OnCanSetCookie(const URLRequest& request,
88 const std::string& cookie_line,
89 CookieOptions* options) {
90 return true;
93 bool NetworkDelegateImpl::OnCanAccessFile(const URLRequest& request,
94 const base::FilePath& path) const {
95 return false;
98 bool NetworkDelegateImpl::OnCanEnablePrivacyMode(
99 const GURL& url,
100 const GURL& first_party_for_cookies) const {
101 return false;
104 bool NetworkDelegateImpl::OnFirstPartyOnlyCookieExperimentEnabled() const {
105 return false;
108 bool NetworkDelegateImpl::OnCancelURLRequestWithPolicyViolatingReferrerHeader(
109 const URLRequest& request,
110 const GURL& target_url,
111 const GURL& referrer_url) const {
112 return false;
115 } // namespace net