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

Unified Diff: chrome/browser/history/history_backend.cc

Issue 8379009: Add a field trial for using lower sqlite cache sizes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/history_backend.cc
===================================================================
--- chrome/browser/history/history_backend.cc (revision 106923)
+++ chrome/browser/history/history_backend.cc (working copy)
@@ -20,6 +20,7 @@
#include "base/time.h"
#include "chrome/browser/autocomplete/history_url_provider.h"
#include "chrome/browser/bookmarks/bookmark_service.h"
+#include "chrome/browser/history/history_field_trial.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_publisher.h"
#include "chrome/browser/history/in_memory_history_backend.h"
@@ -374,6 +375,8 @@
if (!db_.get())
return;
+ TimeTicks beginning_time = TimeTicks::Now();
+
// Will be filled with the URL ID and the visit ID of the last addition.
std::pair<URLID, VisitID> last_ids(0, tracker_.GetLastVisit(
request->id_scope, request->page_id, request->referrer));
@@ -545,6 +548,10 @@
}
ScheduleCommit();
+
+ UMA_HISTOGRAM_TIMES(
+ "History.AddPage" + HistoryFieldTrial::GetGroupSuffix(),
+ TimeTicks::Now() - beginning_time);
}
void HistoryBackend::InitImpl(const std::string& languages) {
@@ -554,6 +561,8 @@
// we only set db_ to the created database if creation is successful. That
// way other methods won't do anything as db_ is still NULL.
+ HistoryFieldTrial::Activate();
+
TimeTicks beginning_time = TimeTicks::Now();
// Compute the file names. Note that the index file can be removed when the
@@ -1223,8 +1232,9 @@
request->ForwardResult(request->handle(), &request->value);
- UMA_HISTOGRAM_TIMES("History.QueryHistory",
- TimeTicks::Now() - beginning_time);
+ UMA_HISTOGRAM_TIMES(
+ "History.QueryHistory" + HistoryFieldTrial::GetGroupSuffix(),
+ TimeTicks::Now() - beginning_time);
}
// Basic time-based querying of history.

Powered by Google App Engine
This is Rietveld 408576698