| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_LOADING_PREDICTOR_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_NET_LOADING_PREDICTOR_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_NET_LOADING_PREDICTOR_OBSERVER_H_ | 6 #define CHROME_BROWSER_NET_LOADING_PREDICTOR_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 net::URLRequest* request, | 43 net::URLRequest* request, |
| 44 const GURL& redirect_url, | 44 const GURL& redirect_url, |
| 45 const content::ResourceRequestInfo::WebContentsGetter& | 45 const content::ResourceRequestInfo::WebContentsGetter& |
| 46 web_contents_getter); | 46 web_contents_getter); |
| 47 void OnResponseStarted(net::URLRequest* request, | 47 void OnResponseStarted(net::URLRequest* request, |
| 48 const content::ResourceRequestInfo::WebContentsGetter& | 48 const content::ResourceRequestInfo::WebContentsGetter& |
| 49 web_contents_getter); | 49 web_contents_getter); |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 void OnRequestStartedOnUIThread( | 52 void OnRequestStartedOnUIThread( |
| 53 std::unique_ptr<predictors::ResourcePrefetchPredictor::URLRequestSummary> | 53 std::unique_ptr<predictors::URLRequestSummary> summary, |
| 54 summary, | |
| 55 const content::ResourceRequestInfo::WebContentsGetter& | 54 const content::ResourceRequestInfo::WebContentsGetter& |
| 56 web_contents_getter, | 55 web_contents_getter, |
| 57 const GURL& main_frame_url, | 56 const GURL& main_frame_url, |
| 58 const base::TimeTicks& creation_time) const; | 57 const base::TimeTicks& creation_time) const; |
| 59 void OnRequestRedirectedOnUIThread( | 58 void OnRequestRedirectedOnUIThread( |
| 60 std::unique_ptr<predictors::ResourcePrefetchPredictor::URLRequestSummary> | 59 std::unique_ptr<predictors::URLRequestSummary> summary, |
| 61 summary, | |
| 62 const content::ResourceRequestInfo::WebContentsGetter& | 60 const content::ResourceRequestInfo::WebContentsGetter& |
| 63 web_contents_getter, | 61 web_contents_getter, |
| 64 const GURL& main_frame_url, | 62 const GURL& main_frame_url, |
| 65 const base::TimeTicks& creation_time) const; | 63 const base::TimeTicks& creation_time) const; |
| 66 void OnResponseStartedOnUIThread( | 64 void OnResponseStartedOnUIThread( |
| 67 std::unique_ptr<predictors::ResourcePrefetchPredictor::URLRequestSummary> | 65 std::unique_ptr<predictors::URLRequestSummary> summary, |
| 68 summary, | |
| 69 const content::ResourceRequestInfo::WebContentsGetter& | 66 const content::ResourceRequestInfo::WebContentsGetter& |
| 70 web_contents_getter, | 67 web_contents_getter, |
| 71 const GURL& main_frame_url, | 68 const GURL& main_frame_url, |
| 72 const base::TimeTicks& creation_time) const; | 69 const base::TimeTicks& creation_time) const; |
| 73 | 70 |
| 74 // Owned by profile. | 71 // Owned by profile. |
| 75 base::WeakPtr<predictors::LoadingPredictor> predictor_; | 72 base::WeakPtr<predictors::LoadingPredictor> predictor_; |
| 76 | 73 |
| 77 DISALLOW_COPY_AND_ASSIGN(LoadingPredictorObserver); | 74 DISALLOW_COPY_AND_ASSIGN(LoadingPredictorObserver); |
| 78 }; | 75 }; |
| 79 | 76 |
| 80 } // namespace chrome_browser_net | 77 } // namespace chrome_browser_net |
| 81 | 78 |
| 82 #endif // CHROME_BROWSER_NET_LOADING_PREDICTOR_OBSERVER_H_ | 79 #endif // CHROME_BROWSER_NET_LOADING_PREDICTOR_OBSERVER_H_ |
| OLD | NEW |