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

Side by Side Diff: chrome/browser/net/prerender_interceptor.cc

Issue 5298008: net: Add namespace net to URLRequest and URLRequestJob classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some chromeos fixes Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/net/prerender_interceptor.h" 5 #include "chrome/browser/net/prerender_interceptor.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/browser_thread.h" 10 #include "chrome/browser/browser_thread.h"
(...skipping 16 matching lines...) Expand all
27 PrerenderInterceptor::PrerenderInterceptor( 27 PrerenderInterceptor::PrerenderInterceptor(
28 PrerenderInterceptorCallback* callback) 28 PrerenderInterceptorCallback* callback)
29 : callback_(callback) { 29 : callback_(callback) {
30 URLRequest::RegisterRequestInterceptor(this); 30 URLRequest::RegisterRequestInterceptor(this);
31 } 31 }
32 32
33 PrerenderInterceptor::~PrerenderInterceptor() { 33 PrerenderInterceptor::~PrerenderInterceptor() {
34 URLRequest::UnregisterRequestInterceptor(this); 34 URLRequest::UnregisterRequestInterceptor(this);
35 } 35 }
36 36
37 URLRequestJob* PrerenderInterceptor::MaybeIntercept(URLRequest* request) { 37 net::URLRequestJob* PrerenderInterceptor::MaybeIntercept(
38 net::URLRequest* request) {
38 return NULL; 39 return NULL;
39 } 40 }
40 41
41 URLRequestJob* PrerenderInterceptor::MaybeInterceptResponse( 42 net::URLRequestJob* PrerenderInterceptor::MaybeInterceptResponse(
42 URLRequest* request) { 43 net::URLRequest* request) {
43 // TODO(gavinp): unfortunately, we can't figure out the origin 44 // TODO(gavinp): unfortunately, we can't figure out the origin
44 // of this request here on systems where the referrer is blocked by 45 // of this request here on systems where the referrer is blocked by
45 // configuration. 46 // configuration.
46 47
47 // TODO(gavinp): note that the response still might be intercepted 48 // TODO(gavinp): note that the response still might be intercepted
48 // by a later interceptor. Should we write an interposing delegate 49 // by a later interceptor. Should we write an interposing delegate
49 // and only prerender dispatch on requests that aren't intercepted? 50 // and only prerender dispatch on requests that aren't intercepted?
50 // Or is this a slippery slope? 51 // Or is this a slippery slope?
51 52
52 if (request->load_flags() & net::LOAD_PREFETCH) { 53 if (request->load_flags() & net::LOAD_PREFETCH) {
(...skipping 16 matching lines...) Expand all
69 } 70 }
70 71
71 void PrerenderInterceptor::PrerenderDispatch( 72 void PrerenderInterceptor::PrerenderDispatch(
72 const GURL& url) { 73 const GURL& url) {
73 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 74 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
74 DVLOG(2) << "PrerenderDispatchOnUIThread: url=" << url; 75 DVLOG(2) << "PrerenderDispatchOnUIThread: url=" << url;
75 } 76 }
76 77
77 } // namespace chrome_browser_net 78 } // namespace chrome_browser_net
78 79
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698