Chromium Code Reviews| 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_, |
|
sky
2016/08/29 16:08:56
Did you investigate what this does to ensure we wa
gcomanici
2016/08/30 18:30:30
This is a very good point. The remaining lines are
|