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

Unified Diff: chrome/browser/predictors/predictor_database.cc

Issue 10900037: Adding more histograms to ResourcePrefetchPredictor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Changes based on renaming recommendations. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/predictors/predictor_database.cc
diff --git a/chrome/browser/predictors/predictor_database.cc b/chrome/browser/predictors/predictor_database.cc
index af6bacb857c8b0900e45c52df64775e9602da0a8..87c64527e1aaef6af7db8ccf1b1ae48e1779e493 100644
--- a/chrome/browser/predictors/predictor_database.cc
+++ b/chrome/browser/predictors/predictor_database.cc
@@ -47,6 +47,7 @@ class PredictorDatabaseInternal
// Cancels pending DB transactions. Should only be called on the UI thread.
void SetCancelled();
+ Profile* const profile_;
dominich 2012/08/30 16:07:31 caching the profile pointer is rarely the right th
Shishir 2012/08/30 17:56:42 Doesn't this make sense for a profile keyed servic
FilePath db_path_;
sql::Connection db_;
@@ -60,7 +61,8 @@ class PredictorDatabaseInternal
PredictorDatabaseInternal::PredictorDatabaseInternal(Profile* profile)
- : db_path_(profile->GetPath().Append(kPredictorDatabaseName)),
+ : profile_(profile),
+ db_path_(profile->GetPath().Append(kPredictorDatabaseName)),
autocomplete_table_(new AutocompleteActionPredictorTable()),
resource_prefetch_tables_(new ResourcePrefetchPredictorTables()) {
}
@@ -98,8 +100,8 @@ void PredictorDatabaseInternal::LogDatabaseStats() {
UMA_HISTOGRAM_MEMORY_KB("PredictorDatabase.DatabaseSizeKB",
static_cast<int>(db_size / 1024));
- autocomplete_table_->LogDatabaseStats();
- resource_prefetch_tables_->LogDatabaseStats();
+ autocomplete_table_->LogDatabaseStats(profile_);
+ resource_prefetch_tables_->LogDatabaseStats(profile_);
dominich 2012/08/30 16:07:31 given you know what table you're calling this on,
Shishir 2012/08/30 17:56:42 Done.
}
PredictorDatabase::PredictorDatabase(Profile* profile)
« no previous file with comments | « chrome/browser/predictors/autocomplete_action_predictor_table.cc ('k') | chrome/browser/predictors/predictor_table_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698