~oxide-developers/oxide/1.2

« back to all changes in this revision

Viewing changes to oxide/browser/oxide_network_delegate.cc

  • Committer: Chris Coulson
  • Date: 2013-07-23 11:40:24 UTC
  • Revision ID: chris.coulson@canonical.com-20130723114024-p7z00cs9p0s5te6e
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// vim:expandtab:shiftwidth=2:tabstop=2:
 
2
// Copyright (C) 2013 Canonical Ltd.
 
3
 
 
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.
 
8
 
 
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.
 
13
 
 
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
 
17
 
 
18
#include "oxide_network_delegate.h"
 
19
 
 
20
#include "net/base/net_errors.h"
 
21
 
 
22
namespace oxide {
 
23
 
 
24
int NetworkDelegate::OnBeforeURLRequest(
 
25
    net::URLRequest* request,
 
26
    const net::CompletionCallback& callback,
 
27
    GURL* new_url) {
 
28
  return net::OK;
 
29
}
 
30
 
 
31
int NetworkDelegate::OnBeforeSendHeaders(
 
32
    net::URLRequest* request,
 
33
    const net::CompletionCallback& callback,
 
34
    net::HttpRequestHeaders* headers) {
 
35
  return net::OK;
 
36
}
 
37
 
 
38
void NetworkDelegate::OnSendHeaders(net::URLRequest* request,
 
39
                                    const net::HttpRequestHeaders& headers) {}
 
40
 
 
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) {
 
46
  return net::OK;
 
47
}
 
48
 
 
49
void NetworkDelegate::OnBeforeRedirect(net::URLRequest* request,
 
50
                                       const GURL& new_location) {}
 
51
 
 
52
void NetworkDelegate::OnResponseStarted(net::URLRequest* request) {}
 
53
 
 
54
void NetworkDelegate::OnRawBytesRead(const net::URLRequest& request,
 
55
                                     int bytes_read) {}
 
56
 
 
57
void NetworkDelegate::OnCompleted(net::URLRequest* request, bool started) {}
 
58
 
 
59
void NetworkDelegate::OnURLRequestDestroyed(net::URLRequest* request) {}
 
60
 
 
61
void NetworkDelegate::OnPACScriptError(int line_number,
 
62
                                       const base::string16& error) {}
 
63
 
 
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;
 
70
}
 
71
 
 
72
bool NetworkDelegate::OnCanGetCookies(const net::URLRequest& request,
 
73
                                      const net::CookieList& cookie_list) {
 
74
  return true;
 
75
}
 
76
 
 
77
bool NetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
 
78
                                     const std::string& cookie_line,
 
79
                                     net::CookieOptions* options) {
 
80
  return true;
 
81
}
 
82
 
 
83
bool NetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
 
84
                                      const base::FilePath& path) const {
 
85
  return true;
 
86
}
 
87
 
 
88
bool NetworkDelegate::OnCanThrottleRequest(
 
89
    const net::URLRequest& request) const {
 
90
  return false;
 
91
}
 
92
 
 
93
int NetworkDelegate::OnBeforeSocketStreamConnect(
 
94
    net::SocketStream* socket,
 
95
    const net::CompletionCallback& callback) {
 
96
  return net::OK;
 
97
}
 
98
 
 
99
void NetworkDelegate::OnRequestWaitStateChange(const net::URLRequest& request,
 
100
                                               RequestWaitState state) {}
 
101
 
 
102
} // namespace oxide