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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 2705113005: Update AutoImport to import nothing by default (in absence of policy and master_prefs). (Closed)
Patch Set: update comment in chrome_browser_main.cc Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 // So make sure to create it before that. 1668 // So make sure to create it before that.
1669 nacl::NaClBrowser::SetDelegate(base::MakeUnique<NaClBrowserDelegateImpl>( 1669 nacl::NaClBrowser::SetDelegate(base::MakeUnique<NaClBrowserDelegateImpl>(
1670 browser_process_->profile_manager())); 1670 browser_process_->profile_manager()));
1671 #endif // !defined(DISABLE_NACL) 1671 #endif // !defined(DISABLE_NACL)
1672 1672
1673 // TODO(stevenjb): Move WIN and MACOSX specific code to appropriate Parts. 1673 // TODO(stevenjb): Move WIN and MACOSX specific code to appropriate Parts.
1674 // (requires supporting early exit). 1674 // (requires supporting early exit).
1675 PostProfileInit(); 1675 PostProfileInit();
1676 1676
1677 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 1677 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
1678 // Show the First Run UI if this is the first time Chrome has been run on 1678 // Execute first run specific code after the PrefService has been initialized
1679 // this computer, or we're being compelled to do so by a command line flag. 1679 // and preferences have been registered since some of the import code depends
1680 // Note that this be done _after_ the PrefService is initialized and all 1680 // on preferences.
1681 // preferences are registered, since some of the code that the importer
1682 // touches reads preferences.
1683 if (first_run::IsChromeFirstRun()) { 1681 if (first_run::IsChromeFirstRun()) {
1684 // By default Auto Import is performed on first run. 1682 first_run::AutoImport(profile_, master_prefs_->import_bookmarks_path);
1685 bool auto_import = true;
1686
1687 #if defined(OS_WIN)
1688 // Auto Import might be disabled via a field trial. However, this field
1689 // trial is not intended to affect enterprise users.
1690 auto_import =
1691 base::win::IsEnterpriseManaged() ||
1692 !base::FeatureList::IsEnabled(features::kDisableFirstRunAutoImportWin);
1693 #endif // defined(OS_WIN)
1694
1695 if (auto_import) {
1696 first_run::AutoImport(profile_, master_prefs_->homepage_defined,
1697 master_prefs_->do_import_items,
1698 master_prefs_->dont_import_items,
1699 master_prefs_->import_bookmarks_path);
1700 }
1701 1683
1702 // Note: this can pop the first run consent dialog on linux. 1684 // Note: this can pop the first run consent dialog on linux.
1703 first_run::DoPostImportTasks(profile_, 1685 first_run::DoPostImportTasks(profile_,
1704 master_prefs_->make_chrome_default_for_user); 1686 master_prefs_->make_chrome_default_for_user);
1705 1687
1706 if (!master_prefs_->suppress_first_run_default_browser_prompt) { 1688 if (!master_prefs_->suppress_first_run_default_browser_prompt) {
1707 browser_creator_->set_show_main_browser_window( 1689 browser_creator_->set_show_main_browser_window(
1708 !chrome::ShowFirstRunDefaultBrowserPrompt(profile_)); 1690 !chrome::ShowFirstRunDefaultBrowserPrompt(profile_));
1709 } else { 1691 } else {
1710 browser_creator_->set_is_default_browser_dialog_suppressed(true); 1692 browser_creator_->set_is_default_browser_dialog_suppressed(true);
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 chromeos::CrosSettings::Shutdown(); 2083 chromeos::CrosSettings::Shutdown();
2102 #endif // defined(OS_CHROMEOS) 2084 #endif // defined(OS_CHROMEOS)
2103 #endif // defined(OS_ANDROID) 2085 #endif // defined(OS_ANDROID)
2104 } 2086 }
2105 2087
2106 // Public members: 2088 // Public members:
2107 2089
2108 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2090 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2109 chrome_extra_parts_.push_back(parts); 2091 chrome_extra_parts_.push_back(parts);
2110 } 2092 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698