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

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

Issue 2225343002: Navigation: move RestoreType and ReloadType into a separate file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: trybots ran with PS8, but one more safe change is added here Created 4 years, 3 months 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
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 #ifndef CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_
6 #define CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_ 6 #define CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/public/browser/notification_observer.h" 9 #include "content/public/browser/notification_observer.h"
10 #include "content/public/browser/notification_registrar.h" 10 #include "content/public/browser/notification_registrar.h"
(...skipping 10 matching lines...) Expand all
21 : public content::WebContentsObserver, 21 : public content::WebContentsObserver,
22 public content::WebContentsUserData<PredictorTabHelper> { 22 public content::WebContentsUserData<PredictorTabHelper> {
23 public: 23 public:
24 ~PredictorTabHelper() override; 24 ~PredictorTabHelper() override;
25 25
26 // content::WebContentsObserver: 26 // content::WebContentsObserver:
27 void DidStartNavigation( 27 void DidStartNavigation(
28 content::NavigationHandle* navigation_handle) override; 28 content::NavigationHandle* navigation_handle) override;
29 void DidStartNavigationToPendingEntry( 29 void DidStartNavigationToPendingEntry(
30 const GURL& url, 30 const GURL& url,
31 content::NavigationController::ReloadType reload_type) override; 31 content::ReloadType reload_type) override;
32 void DocumentOnLoadCompletedInMainFrame() override; 32 void DocumentOnLoadCompletedInMainFrame() override;
33 33
34 private: 34 private:
35 explicit PredictorTabHelper(content::WebContents* web_contents); 35 explicit PredictorTabHelper(content::WebContents* web_contents);
36 friend class content::WebContentsUserData<PredictorTabHelper>; 36 friend class content::WebContentsUserData<PredictorTabHelper>;
37 37
38 void PreconnectUrl(const GURL& url); 38 void PreconnectUrl(const GURL& url);
39 39
40 // This boolean is set to true after a call to 40 // This boolean is set to true after a call to
41 // DidStartNavigationToPendingEntry, which fires off predictive preconnects. 41 // DidStartNavigationToPendingEntry, which fires off predictive preconnects.
42 // This ensures that the resulting call to DidStartNavigation does not 42 // This ensures that the resulting call to DidStartNavigation does not
43 // duplicate these preconnects. The tab helper spawns preconnects on the 43 // duplicate these preconnects. The tab helper spawns preconnects on the
44 // navigation to the pending entry because DidStartNavigation is called after 44 // navigation to the pending entry because DidStartNavigation is called after
45 // render process spawn (pre-PlzNavigate), which can take substantial time 45 // render process spawn (pre-PlzNavigate), which can take substantial time
46 // especially on Android. 46 // especially on Android.
47 bool predicted_from_pending_entry_; 47 bool predicted_from_pending_entry_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(PredictorTabHelper); 49 DISALLOW_COPY_AND_ASSIGN(PredictorTabHelper);
50 }; 50 };
51 51
52 } // namespace chrome_browser_net 52 } // namespace chrome_browser_net
53 53
54 #endif // CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_ 54 #endif // CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698