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

Side by Side Diff: chrome/browser/predictors/loading_predictor.h

Issue 2937623007: predictors: Move more methods from ResourcePrefetchPredictor into LoadingDataCollector. (Closed)
Patch Set: Fix browser test Created 3 years, 5 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 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_PREDICTORS_LOADING_PREDICTOR_H_ 5 #ifndef CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_
6 #define CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_ 6 #define CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Starts initialization, will complete asynchronously. 59 // Starts initialization, will complete asynchronously.
60 void StartInitialization(); 60 void StartInitialization();
61 61
62 // Don't use, internal only. 62 // Don't use, internal only.
63 ResourcePrefetchPredictor* resource_prefetch_predictor(); 63 ResourcePrefetchPredictor* resource_prefetch_predictor();
64 LoadingDataCollector* loading_data_collector(); 64 LoadingDataCollector* loading_data_collector();
65 65
66 // KeyedService: 66 // KeyedService:
67 void Shutdown() override; 67 void Shutdown() override;
68 68
69 void OnMainFrameRequest( 69 void OnMainFrameRequest(const URLRequestSummary& summary);
70 const ResourcePrefetchPredictor::URLRequestSummary& summary); 70 void OnMainFrameRedirect(const URLRequestSummary& summary);
71 void OnMainFrameRedirect( 71 void OnMainFrameResponse(const URLRequestSummary& summary);
72 const ResourcePrefetchPredictor::URLRequestSummary& summary);
73 void OnMainFrameResponse(
74 const ResourcePrefetchPredictor::URLRequestSummary& summary);
75 72
76 base::WeakPtr<LoadingPredictor> GetWeakPtr() { 73 base::WeakPtr<LoadingPredictor> GetWeakPtr() {
77 return weak_factory_.GetWeakPtr(); 74 return weak_factory_.GetWeakPtr();
78 } 75 }
79 76
80 // ResourcePrefetcher::Delegate: 77 // ResourcePrefetcher::Delegate:
81 void ResourcePrefetcherFinished( 78 void ResourcePrefetcherFinished(
82 ResourcePrefetcher* prefetcher, 79 ResourcePrefetcher* prefetcher,
83 std::unique_ptr<ResourcePrefetcher::PrefetcherStats> stats) override; 80 std::unique_ptr<ResourcePrefetcher::PrefetcherStats> stats) override;
84 81
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 169
173 private: 170 private:
174 LoadingPredictor* predictor_; 171 LoadingPredictor* predictor_;
175 172
176 DISALLOW_COPY_AND_ASSIGN(TestLoadingObserver); 173 DISALLOW_COPY_AND_ASSIGN(TestLoadingObserver);
177 }; 174 };
178 175
179 } // namespace predictors 176 } // namespace predictors
180 177
181 #endif // CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_ 178 #endif // CHROME_BROWSER_PREDICTORS_LOADING_PREDICTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/predictors/loading_data_collector_unittest.cc ('k') | chrome/browser/predictors/loading_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698