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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 2253953003: Disable AutoImport: experiment and histogram for analysis. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Counts empty histories as well 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
« no previous file with comments | « no previous file | chrome/browser/importer/profile_writer.cc » ('j') | chrome/browser/importer/profile_writer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index adc1045e14c3a1dbb54927da2a17b6d4026c00a1..efc2b53dab675858964d9bc35645cfbfab433a3a 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -206,6 +206,7 @@
#if defined(OS_WIN)
#include "base/trace_event/trace_event_etw_export_win.h"
+#include "base/win/win_util.h"
#include "base/win/windows_version.h"
#include "chrome/app/file_pre_reader_win.h"
#include "chrome/browser/chrome_browser_main_win.h"
@@ -1813,11 +1814,23 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// preferences are registered, since some of the code that the importer
// touches reads preferences.
if (first_run::IsChromeFirstRun()) {
- first_run::AutoImport(profile_,
- master_prefs_->homepage_defined,
- master_prefs_->do_import_items,
- master_prefs_->dont_import_items,
- master_prefs_->import_bookmarks_path);
+ // By default Auto Import is performed on first run.
+ bool auto_import = true;
+
+#if defined(OS_WIN)
+ // Auto Import might be disabled via a field trial. However, this field
+ // trial is not intended to affect enterprise users.
+ auto_import =
+ base::win::IsEnrolledToDomain() ||
+ !base::FeatureList::IsEnabled(features::kDisableFirstRunAutoImportWin);
+#endif // defined(OS_WIN)
+
+ if (auto_import) {
+ first_run::AutoImport(profile_, master_prefs_->homepage_defined,
+ master_prefs_->do_import_items,
+ master_prefs_->dont_import_items,
+ master_prefs_->import_bookmarks_path);
+ }
// Note: this can pop the first run consent dialog on linux.
first_run::DoPostImportTasks(profile_,
« no previous file with comments | « no previous file | chrome/browser/importer/profile_writer.cc » ('j') | chrome/browser/importer/profile_writer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698