forked from nwjs/nw.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell_network_delegate.cc
More file actions
121 lines (98 loc) · 3.94 KB
/
shell_network_delegate.cc
File metadata and controls
121 lines (98 loc) · 3.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// Copyright (c) 2012 Intel Corp
// Copyright (c) 2012 The Chromium Authors
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell co
// pies of the Software, and to permit persons to whom the Software is furnished
// to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in al
// l copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IM
// PLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNES
// S FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WH
// ETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "content/shell/shell_network_delegate.h"
#include "net/base/net_errors.h"
namespace content {
ShellNetworkDelegate::ShellNetworkDelegate() {
}
ShellNetworkDelegate::~ShellNetworkDelegate() {
}
int ShellNetworkDelegate::OnBeforeURLRequest(
net::URLRequest* request,
const net::CompletionCallback& callback,
GURL* new_url) {
return net::OK;
}
int ShellNetworkDelegate::OnBeforeSendHeaders(
net::URLRequest* request,
const net::CompletionCallback& callback,
net::HttpRequestHeaders* headers) {
return net::OK;
}
void ShellNetworkDelegate::OnSendHeaders(
net::URLRequest* request,
const net::HttpRequestHeaders& headers) {
}
int ShellNetworkDelegate::OnHeadersReceived(
net::URLRequest* request,
const net::CompletionCallback& callback,
net::HttpResponseHeaders* original_response_headers,
scoped_refptr<net::HttpResponseHeaders>* override_response_headers) {
return net::OK;
}
void ShellNetworkDelegate::OnBeforeRedirect(net::URLRequest* request,
const GURL& new_location) {
}
void ShellNetworkDelegate::OnResponseStarted(net::URLRequest* request) {
}
void ShellNetworkDelegate::OnRawBytesRead(const net::URLRequest& request,
int bytes_read) {
}
void ShellNetworkDelegate::OnCompleted(net::URLRequest* request, bool started) {
}
void ShellNetworkDelegate::OnURLRequestDestroyed(net::URLRequest* request) {
}
void ShellNetworkDelegate::OnPACScriptError(int line_number,
const string16& error) {
}
ShellNetworkDelegate::AuthRequiredResponse ShellNetworkDelegate::OnAuthRequired(
net::URLRequest* request,
const net::AuthChallengeInfo& auth_info,
const AuthCallback& callback,
net::AuthCredentials* credentials) {
return AUTH_REQUIRED_RESPONSE_NO_ACTION;
}
bool ShellNetworkDelegate::OnCanGetCookies(const net::URLRequest& request,
const net::CookieList& cookie_list) {
return true;
}
bool ShellNetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
const std::string& cookie_line,
net::CookieOptions* options) {
return true;
}
bool ShellNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
const FilePath& path) const {
return true;
}
bool ShellNetworkDelegate::OnCanThrottleRequest(
const net::URLRequest& request) const {
return false;
}
int ShellNetworkDelegate::OnBeforeSocketStreamConnect(
net::SocketStream* socket,
const net::CompletionCallback& callback) {
return net::OK;
}
void ShellNetworkDelegate::OnCacheWaitStateChange(
const net::URLRequest& request,
CacheWaitState waiting) {
}
} // namespace content