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

Unified Diff: chrome/browser/importer/profile_writer.cc

Issue 2253953003: Disable AutoImport: experiment and histogram for analysis. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/importer/profile_writer.cc
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc
index 642bbf31567c2c7bcaf189d08041fd459c3a7396..41c6668a4f6465a7485c8a717f9c486a2fb02aff 100644
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -10,6 +10,7 @@
#include <set>
#include <string>
+#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -18,6 +19,7 @@
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
+#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -36,7 +38,6 @@
#include "components/search_engines/template_url_service.h"
#if defined(OS_WIN)
-#include "chrome/browser/web_data_service_factory.h"
#include "components/password_manager/core/browser/webdata/password_web_data_service_win.h"
#endif
@@ -108,6 +109,12 @@ void ProfileWriter::AddHistoryPage(const history::URLRows& page,
HistoryServiceFactory::GetForProfile(profile_,
ServiceAccessType::EXPLICIT_ACCESS)
->AddPagesWithDetails(page, visit_source);
+ // Measure the size of the history page after Auto Import on first run.
+ if (first_run::IsChromeFirstRun() &&
+ visit_source == history::SOURCE_IE_IMPORTED) {
+ UMA_HISTOGRAM_COUNTS("Import.ImportedHistorySize.AutoImportFromIE",
+ page.size());
+ }
}
void ProfileWriter::AddHomepage(const GURL& home_page) {

Powered by Google App Engine
This is Rietveld 408576698