Chromium Code Reviews| 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..103a492d04ab330e06b72e4e1b922072708a73ff 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.h" |
|
Ilya Sherman
2016/08/22 21:10:45
nit: Please import histogram_macros.h instead.
gcomanici
2016/08/23 16:31:59
Done.
|
| #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 AutoImport from IE |
| + // on first run. |
| + if (first_run::IsChromeFirstRun()) { |
| + UMA_HISTOGRAM_COUNTS("Import.SizeImportedHistory.AutoImport", |
| + page.size()); |
| + } |
| } |
| void ProfileWriter::AddHomepage(const GURL& home_page) { |