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

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

Issue 2625063002: predictors: Add ResourcePrefetchPredictor database readiness histogram. (Closed)
Patch Set: Created 3 years, 11 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 RedirectDataMap* redirect_map); 304 RedirectDataMap* redirect_map);
305 305
306 // Updates information about final redirect destination for |key| in 306 // Updates information about final redirect destination for |key| in
307 // |redirect_map| and correspondingly updates the predictor database. 307 // |redirect_map| and correspondingly updates the predictor database.
308 void LearnRedirect(const std::string& key, 308 void LearnRedirect(const std::string& key,
309 PrefetchKeyType key_type, 309 PrefetchKeyType key_type,
310 const std::string& final_redirect, 310 const std::string& final_redirect,
311 size_t max_redirect_map_size, 311 size_t max_redirect_map_size,
312 RedirectDataMap* redirect_map); 312 RedirectDataMap* redirect_map);
313 313
314 // Reports overall page load time. 314 // Reports database readiness metric defined as percentage of navigated hosts
alexilin 2017/01/11 10:06:16 Oops! These are undefined and unused methods.
315 void ReportPageLoadTimeStats(base::TimeDelta plt) const; 315 // found in DB for last X entries in history.
316 316 void ReportDatabaseReadiness(const history::TopHostsList& top_hosts);
317 // Reports page load time for prefetched and not prefetched pages.
318 void ReportPageLoadTimePrefetchStats(
319 base::TimeDelta plt,
320 bool prefetched,
321 base::Callback<void(int)> report_network_type_callback,
322 PrefetchKeyType key_type) const;
323 317
324 // history::HistoryServiceObserver: 318 // history::HistoryServiceObserver:
325 void OnURLsDeleted(history::HistoryService* history_service, 319 void OnURLsDeleted(history::HistoryService* history_service,
326 bool all_history, 320 bool all_history,
327 bool expired, 321 bool expired,
328 const history::URLRows& deleted_rows, 322 const history::URLRows& deleted_rows,
329 const std::set<GURL>& favicon_urls) override; 323 const std::set<GURL>& favicon_urls) override;
330 void OnHistoryServiceLoaded( 324 void OnHistoryServiceLoaded(
331 history::HistoryService* history_service) override; 325 history::HistoryService* history_service) override;
332 326
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 377
384 private: 378 private:
385 ResourcePrefetchPredictor* predictor_; 379 ResourcePrefetchPredictor* predictor_;
386 380
387 DISALLOW_COPY_AND_ASSIGN(TestObserver); 381 DISALLOW_COPY_AND_ASSIGN(TestObserver);
388 }; 382 };
389 383
390 } // namespace predictors 384 } // namespace predictors
391 385
392 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_H_ 386 #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