~rpadovani/oxide/type-info

« back to all changes in this revision

Viewing changes to shared/browser/oxide_network_delegate.cc

  • Committer: Riccardo Padovani
  • Date: 2015-10-19 07:56:29 UTC
  • mfrom: (1088.1.131 oxide)
  • Revision ID: riccardo@rpadovani.com-20151019075629-z0mlhwlb9xflkovw
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
namespace oxide {
28
28
 
 
29
namespace {
 
30
const char kDoNotTrackHeaderName[] = "DNT";
 
31
}
 
32
 
29
33
int NetworkDelegate::OnBeforeURLRequest(
30
34
    net::URLRequest* request,
31
35
    const net::CompletionCallback& callback,
35
39
    return net::OK;
36
40
  }
37
41
 
 
42
  bool do_not_track = context_->GetDoNotTrack();
 
43
  if (do_not_track) {
 
44
    request->SetExtraRequestHeaderByName(
 
45
        kDoNotTrackHeaderName, "1", true);
 
46
  }
 
47
 
38
48
  return delegate->OnBeforeURLRequest(request, callback, new_url);
39
49
}
40
50
 
86
96
 
87
97
void NetworkDelegate::OnResponseStarted(net::URLRequest* request) {}
88
98
 
89
 
void NetworkDelegate::OnRawBytesRead(const net::URLRequest& request,
90
 
                                     int bytes_read) {}
 
99
void NetworkDelegate::OnNetworkBytesReceived(const net::URLRequest& request,
 
100
                                             int64_t bytes_received) {}
 
101
 
 
102
void NetworkDelegate::OnNetworkBytesSent(const net::URLRequest& request,
 
103
                                         int64_t bytes_sent) {}
91
104
 
92
105
void NetworkDelegate::OnCompleted(net::URLRequest* request, bool started) {}
93
106
 
94
107
void NetworkDelegate::OnURLRequestDestroyed(net::URLRequest* request) {}
95
108
 
 
109
void NetworkDelegate::OnURLRequestJobOrphaned(net::URLRequest* request) {}
 
110
 
96
111
void NetworkDelegate::OnPACScriptError(int line_number,
97
112
                                       const base::string16& error) {}
98
113
 
124
139
  return true;
125
140
}
126
141
 
127
 
bool NetworkDelegate::OnCanThrottleRequest(
128
 
    const net::URLRequest& request) const {
129
 
  return false;
130
 
}
131
 
 
132
142
bool NetworkDelegate::OnCanEnablePrivacyMode(
133
143
    const GURL& url,
134
144
    const GURL& first_party_for_cookies) const {