Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: net/base/network_delegate.cc

Issue 787803004: Update from https://crrev.com/307664 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/base/network_delegate.h ('k') | net/base/network_delegate_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/network_delegate.h" 5 #include "net/base/network_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "net/base/load_flags.h" 9 #include "net/base/load_flags.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 const GURL& referrer_url) const { 235 const GURL& referrer_url) const {
236 DCHECK(CalledOnValidThread()); 236 DCHECK(CalledOnValidThread());
237 // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed. 237 // TODO(vadimt): Remove ScopedTracker below once crbug.com/423948 is fixed.
238 tracked_objects::ScopedTracker tracking_profile( 238 tracked_objects::ScopedTracker tracking_profile(
239 FROM_HERE_WITH_EXPLICIT_FUNCTION( 239 FROM_HERE_WITH_EXPLICIT_FUNCTION(
240 "423948 NetworkDelegate::OnCancelURLRequestWithPolicy...")); 240 "423948 NetworkDelegate::OnCancelURLRequestWithPolicy..."));
241 return OnCancelURLRequestWithPolicyViolatingReferrerHeader( 241 return OnCancelURLRequestWithPolicyViolatingReferrerHeader(
242 request, target_url, referrer_url); 242 request, target_url, referrer_url);
243 } 243 }
244 244
245 int NetworkDelegate::OnBeforeURLRequest(URLRequest* request,
246 const CompletionCallback& callback,
247 GURL* new_url) {
248 return OK;
249 }
250
251 void NetworkDelegate::OnResolveProxy(
252 const GURL& url,
253 int load_flags,
254 const ProxyService& proxy_service,
255 ProxyInfo* result) {
256 }
257
258 void NetworkDelegate::OnProxyFallback(const ProxyServer& bad_proxy,
259 int net_error) {
260 }
261
262 int NetworkDelegate::OnBeforeSendHeaders(URLRequest* request,
263 const CompletionCallback& callback,
264 HttpRequestHeaders* headers) {
265 return OK;
266 }
267
268 void NetworkDelegate::OnBeforeSendProxyHeaders(
269 URLRequest* request,
270 const ProxyInfo& proxy_info,
271 HttpRequestHeaders* headers) {
272 }
273
274 void NetworkDelegate::OnSendHeaders(URLRequest* request,
275 const HttpRequestHeaders& headers) {
276 }
277
278 int NetworkDelegate::OnHeadersReceived(
279 URLRequest* request,
280 const CompletionCallback& callback,
281 const HttpResponseHeaders* original_response_headers,
282 scoped_refptr<HttpResponseHeaders>* override_response_headers,
283 GURL* allowed_unsafe_redirect_url) {
284 return OK;
285 }
286
287 void NetworkDelegate::OnBeforeRedirect(URLRequest* request,
288 const GURL& new_location) {
289 }
290
291 void NetworkDelegate::OnResponseStarted(URLRequest* request) {
292 }
293
294 void NetworkDelegate::OnRawBytesRead(const URLRequest& request,
295 int bytes_read) {
296 }
297
298 void NetworkDelegate::OnCompleted(URLRequest* request, bool started) {
299 }
300
301 void NetworkDelegate::OnURLRequestDestroyed(URLRequest* request) {
302 }
303
304 void NetworkDelegate::OnPACScriptError(int line_number,
305 const base::string16& error) {
306 }
307
308 NetworkDelegate::AuthRequiredResponse NetworkDelegate::OnAuthRequired(
309 URLRequest* request,
310 const AuthChallengeInfo& auth_info,
311 const AuthCallback& callback,
312 AuthCredentials* credentials) {
313 return AUTH_REQUIRED_RESPONSE_NO_ACTION;
314 }
315
316 bool NetworkDelegate::OnCanGetCookies(const URLRequest& request,
317 const CookieList& cookie_list) {
318 return true;
319 }
320
321 bool NetworkDelegate::OnCanSetCookie(const URLRequest& request,
322 const std::string& cookie_line,
323 CookieOptions* options) {
324 return true;
325 }
326
327 bool NetworkDelegate::OnCanAccessFile(const URLRequest& request,
328 const base::FilePath& path) const {
329 return false;
330 }
331
332 bool NetworkDelegate::OnCanThrottleRequest(const URLRequest& request) const {
333 return false;
334 }
335
336 bool NetworkDelegate::OnCanEnablePrivacyMode(
337 const GURL& url,
338 const GURL& first_party_for_cookies) const {
339 return false;
340 }
341
342 bool NetworkDelegate::OnCancelURLRequestWithPolicyViolatingReferrerHeader(
343 const URLRequest& request,
344 const GURL& target_url,
345 const GURL& referrer_url) const {
346 return false;
347 }
348
349 } // namespace net 245 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_delegate.h ('k') | net/base/network_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698