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

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

Issue 2268283005: predictors: Refactor the resource_prefetch_predictor database handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 ResourcePrefetcher::RequestVector* requests); 173 ResourcePrefetcher::RequestVector* requests);
174 ~Result(); 174 ~Result();
175 175
176 PrefetchKeyType key_type; 176 PrefetchKeyType key_type;
177 std::unique_ptr<ResourcePrefetcher::RequestVector> requests; 177 std::unique_ptr<ResourcePrefetcher::RequestVector> requests;
178 178
179 private: 179 private:
180 DISALLOW_COPY_AND_ASSIGN(Result); 180 DISALLOW_COPY_AND_ASSIGN(Result);
181 }; 181 };
182 182
183 typedef ResourcePrefetchPredictorTables::ResourceRow ResourceRow;
184 typedef ResourcePrefetchPredictorTables::ResourceRows ResourceRows;
185 typedef ResourcePrefetchPredictorTables::PrefetchData PrefetchData; 183 typedef ResourcePrefetchPredictorTables::PrefetchData PrefetchData;
186 typedef ResourcePrefetchPredictorTables::PrefetchDataMap PrefetchDataMap; 184 typedef ResourcePrefetchPredictorTables::PrefetchDataMap PrefetchDataMap;
187 typedef std::map<NavigationID, linked_ptr<std::vector<URLRequestSummary> > > 185 typedef std::map<NavigationID, linked_ptr<std::vector<URLRequestSummary> > >
188 NavigationMap; 186 NavigationMap;
189 typedef std::map<NavigationID, std::unique_ptr<Result>> ResultsMap; 187 typedef std::map<NavigationID, std::unique_ptr<Result>> ResultsMap;
190 188
191 // Returns true if the main page request is supported for prediction. 189 // Returns true if the main page request is supported for prediction.
192 static bool IsHandledMainPage(net::URLRequest* request); 190 static bool IsHandledMainPage(net::URLRequest* request);
193 191
194 // Returns true if the subresource request is supported for prediction. 192 // Returns true if the subresource request is supported for prediction.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 343
346 ScopedObserver<history::HistoryService, history::HistoryServiceObserver> 344 ScopedObserver<history::HistoryService, history::HistoryServiceObserver>
347 history_service_observer_; 345 history_service_observer_;
348 346
349 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor); 347 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictor);
350 }; 348 };
351 349
352 } // namespace predictors 350 } // namespace predictors
353 351
354 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ 352 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/predictors/resource_prefetch_predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698