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

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

Issue 2388783002: predictors: Refactor resource_prefetch_predictor_tables. (Closed)
Patch Set: Fix nits. Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_RESOURCE_PREFETCH_PREDICTOR_H_ 5 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_
6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ~GetUrlVisitCountTask() override; 197 ~GetUrlVisitCountTask() override;
198 198
199 int visit_count_; 199 int visit_count_;
200 NavigationID navigation_id_; 200 NavigationID navigation_id_;
201 std::unique_ptr<PageRequestSummary> summary_; 201 std::unique_ptr<PageRequestSummary> summary_;
202 VisitInfoCallback callback_; 202 VisitInfoCallback callback_;
203 203
204 DISALLOW_COPY_AND_ASSIGN(GetUrlVisitCountTask); 204 DISALLOW_COPY_AND_ASSIGN(GetUrlVisitCountTask);
205 }; 205 };
206 206
207 typedef ResourcePrefetchPredictorTables::PrefetchData PrefetchData;
208 typedef ResourcePrefetchPredictorTables::PrefetchDataMap PrefetchDataMap; 207 typedef ResourcePrefetchPredictorTables::PrefetchDataMap PrefetchDataMap;
209 typedef ResourcePrefetchPredictorTables::RedirectDataMap RedirectDataMap; 208 typedef ResourcePrefetchPredictorTables::RedirectDataMap RedirectDataMap;
210 209
211 typedef std::map<NavigationID, std::unique_ptr<PageRequestSummary>> 210 typedef std::map<NavigationID, std::unique_ptr<PageRequestSummary>>
212 NavigationMap; 211 NavigationMap;
213 212
214 // Returns true if the main page request is supported for prediction. 213 // Returns true if the main page request is supported for prediction.
215 static bool IsHandledMainPage(net::URLRequest* request); 214 static bool IsHandledMainPage(net::URLRequest* request);
216 215
217 // Returns true if the subresource request is supported for prediction. 216 // Returns true if the subresource request is supported for prediction.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 360
362 ScopedObserver<history::HistoryService, history::HistoryServiceObserver> 361 ScopedObserver<history::HistoryService, history::HistoryServiceObserver>
363 history_service_observer_; 362 history_service_observer_;
364 363
365 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor); 364 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor);
366 }; 365 };
367 366
368 } // namespace predictors 367 } // namespace predictors
369 368
370 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ 369 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698