1
// vim:expandtab:shiftwidth=2:tabstop=2:
2
// Copyright (C) 2013 Canonical Ltd.
4
// This library is free software; you can redistribute it and/or
5
// modify it under the terms of the GNU Lesser General Public
6
// License as published by the Free Software Foundation; either
7
// version 2.1 of the License, or (at your option) any later version.
9
// This library is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
// Lesser General Public License for more details.
14
// You should have received a copy of the GNU Lesser General Public
15
// License along with this library; if not, write to the Free Software
16
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
#include "oxide_network_delegate.h"
20
#include "net/base/net_errors.h"
24
int NetworkDelegate::OnBeforeURLRequest(
25
net::URLRequest* request,
26
const net::CompletionCallback& callback,
31
int NetworkDelegate::OnBeforeSendHeaders(
32
net::URLRequest* request,
33
const net::CompletionCallback& callback,
34
net::HttpRequestHeaders* headers) {
38
void NetworkDelegate::OnSendHeaders(net::URLRequest* request,
39
const net::HttpRequestHeaders& headers) {}
41
int NetworkDelegate::OnHeadersReceived(
42
net::URLRequest* request,
43
const net::CompletionCallback& callback,
44
const net::HttpResponseHeaders* original_response_headers,
45
scoped_refptr<net::HttpResponseHeaders>* override_response_headers) {
49
void NetworkDelegate::OnBeforeRedirect(net::URLRequest* request,
50
const GURL& new_location) {}
52
void NetworkDelegate::OnResponseStarted(net::URLRequest* request) {}
54
void NetworkDelegate::OnRawBytesRead(const net::URLRequest& request,
57
void NetworkDelegate::OnCompleted(net::URLRequest* request, bool started) {}
59
void NetworkDelegate::OnURLRequestDestroyed(net::URLRequest* request) {}
61
void NetworkDelegate::OnPACScriptError(int line_number,
62
const base::string16& error) {}
64
net::NetworkDelegate::AuthRequiredResponse NetworkDelegate::OnAuthRequired(
65
net::URLRequest* request,
66
const net::AuthChallengeInfo& auth_info,
67
const AuthCallback& callback,
68
net::AuthCredentials* credentials) {
69
return AUTH_REQUIRED_RESPONSE_NO_ACTION;
72
bool NetworkDelegate::OnCanGetCookies(const net::URLRequest& request,
73
const net::CookieList& cookie_list) {
77
bool NetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
78
const std::string& cookie_line,
79
net::CookieOptions* options) {
83
bool NetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
84
const base::FilePath& path) const {
88
bool NetworkDelegate::OnCanThrottleRequest(
89
const net::URLRequest& request) const {
93
int NetworkDelegate::OnBeforeSocketStreamConnect(
94
net::SocketStream* socket,
95
const net::CompletionCallback& callback) {
99
void NetworkDelegate::OnRequestWaitStateChange(const net::URLRequest& request,
100
RequestWaitState state) {}