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

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

Issue 84063003: Rename WebContentsObserver::NavigateToPendingEntry to DidStartNavigationToPendingEntry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/predictor_tab_helper.h" 5 #include "chrome/browser/net/predictor_tab_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/net/predictor.h" 8 #include "chrome/browser/net/predictor.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 23 matching lines...) Expand all
34 34
35 namespace chrome_browser_net { 35 namespace chrome_browser_net {
36 36
37 PredictorTabHelper::PredictorTabHelper(content::WebContents* web_contents) 37 PredictorTabHelper::PredictorTabHelper(content::WebContents* web_contents)
38 : content::WebContentsObserver(web_contents) { 38 : content::WebContentsObserver(web_contents) {
39 } 39 }
40 40
41 PredictorTabHelper::~PredictorTabHelper() { 41 PredictorTabHelper::~PredictorTabHelper() {
42 } 42 }
43 43
44 void PredictorTabHelper::NavigateToPendingEntry( 44 void PredictorTabHelper::DidCreatePendingEntry(
45 const GURL& url, 45 const GURL& url,
46 content::NavigationController::ReloadType reload_type) { 46 content::NavigationController::ReloadType reload_type) {
47 Profile* profile = 47 Profile* profile =
48 Profile::FromBrowserContext(web_contents()->GetBrowserContext()); 48 Profile::FromBrowserContext(web_contents()->GetBrowserContext());
49 chrome_browser_net::Predictor* predictor = profile->GetNetworkPredictor(); 49 chrome_browser_net::Predictor* predictor = profile->GetNetworkPredictor();
50 if (!predictor) 50 if (!predictor)
51 return; 51 return;
52 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kChromeFrame) && 52 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kChromeFrame) &&
53 (url.SchemeIs(content::kHttpScheme) || 53 (url.SchemeIs(content::kHttpScheme) ||
54 url.SchemeIs(content::kHttpsScheme))) 54 url.SchemeIs(content::kHttpsScheme)))
(...skipping 14 matching lines...) Expand all
69 BrowserThread::PostTask( 69 BrowserThread::PostTask(
70 BrowserThread::IO, 70 BrowserThread::IO,
71 FROM_HERE, 71 FROM_HERE,
72 base::Bind(&Predictor::RecordLinkNavigation, 72 base::Bind(&Predictor::RecordLinkNavigation,
73 base::Unretained(predictor), 73 base::Unretained(predictor),
74 params.url)); 74 params.url));
75 } 75 }
76 } 76 }
77 77
78 } // namespace chrome_browser_net 78 } // namespace chrome_browser_net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698