diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/first_run_win.cc | 2 | ||||
-rw-r--r-- | chrome/installer/util/google_chrome_distribution_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/installer/util/master_preferences.cc | 5 | ||||
-rw-r--r-- | chrome/installer/util/master_preferences.h | 5 |
4 files changed, 12 insertions, 2 deletions
diff --git a/chrome/browser/first_run_win.cc b/chrome/browser/first_run_win.cc index 59aaebf..2ac5cac 100644 --- a/chrome/browser/first_run_win.cc +++ b/chrome/browser/first_run_win.cc @@ -253,6 +253,8 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir, import_items += HISTORY; if (parse_result & installer_util::MASTER_PROFILE_IMPORT_BOOKMARKS) import_items += FAVORITES; + if (parse_result & installer_util::MASTER_PROFILE_IMPORT_HOME_PAGE) + import_items += HOME_PAGE; if (import_items) { // There is something to import from the default browser. This launches diff --git a/chrome/installer/util/google_chrome_distribution_unittest.cc b/chrome/installer/util/google_chrome_distribution_unittest.cc index 5e3a71e..e4bad05 100644 --- a/chrome/installer/util/google_chrome_distribution_unittest.cc +++ b/chrome/installer/util/google_chrome_distribution_unittest.cc @@ -266,6 +266,7 @@ TEST(MasterPreferences, ParseDistroParams) { " \"import_search_engine\": true,\n" " \"import_history\": true,\n" " \"import_bookmarks\": true,\n" + " \"import_home_page\": true,\n" " \"create_all_shortcuts\": true,\n" " \"do_not_launch_chrome\": true,\n" " \"make_chrome_default\": true,\n" @@ -289,6 +290,7 @@ TEST(MasterPreferences, ParseDistroParams) { EXPECT_TRUE(result & installer_util::MASTER_PROFILE_IMPORT_SEARCH_ENGINE); EXPECT_TRUE(result & installer_util::MASTER_PROFILE_IMPORT_HISTORY); EXPECT_TRUE(result & installer_util::MASTER_PROFILE_IMPORT_BOOKMARKS); + EXPECT_TRUE(result & installer_util::MASTER_PROFILE_IMPORT_HOME_PAGE); EXPECT_TRUE(result & installer_util::MASTER_PROFILE_CREATE_ALL_SHORTCUTS); EXPECT_TRUE(result & installer_util::MASTER_PROFILE_DO_NOT_LAUNCH_CHROME); EXPECT_TRUE(result & installer_util::MASTER_PROFILE_MAKE_CHROME_DEFAULT); diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc index 9e440af..c59bc1d 100644 --- a/chrome/installer/util/master_preferences.cc +++ b/chrome/installer/util/master_preferences.cc @@ -71,7 +71,8 @@ const wchar_t kRequireEula[] = L"require_eula"; const wchar_t kAltShortcutText[] = L"alternate_shortcut_text"; // Use alternate smaller first run info bubble. const wchar_t kAltFirstRunBubble[] = L"oem_bubble"; - +// Boolean pref that triggers silent import of the default browser homepage. +const wchar_t kDistroImportHomePagePref[] = L"import_home_page"; int ParseDistributionPreferences(const std::wstring& master_prefs_path) { if (!file_util::PathExists(master_prefs_path)) @@ -95,6 +96,8 @@ int ParseDistributionPreferences(const std::wstring& master_prefs_path) { parse_result |= MASTER_PROFILE_IMPORT_HISTORY; if (GetBooleanPref(distro, kDistroImportBookmarksPref)) parse_result |= MASTER_PROFILE_IMPORT_BOOKMARKS; + if (GetBooleanPref(distro, kDistroImportHomePagePref)) + parse_result |= MASTER_PROFILE_IMPORT_HOME_PAGE; if (GetBooleanPref(distro, kMakeChromeDefaultForUser)) parse_result |= MASTER_PROFILE_MAKE_CHROME_DEFAULT_FOR_USER; if (GetBooleanPref(distro, kCreateAllShortcuts)) diff --git a/chrome/installer/util/master_preferences.h b/chrome/installer/util/master_preferences.h index 46513e9..c83464e 100644 --- a/chrome/installer/util/master_preferences.h +++ b/chrome/installer/util/master_preferences.h @@ -55,7 +55,9 @@ enum MasterPrefResult { // Use an alternate description text for some shortcuts. MASTER_PROFILE_ALT_SHORTCUT_TXT = 0x1 << 14, // Use a smaller OEM info bubble on first run. - MASTER_PROFILE_OEM_FIRST_RUN_BUBBLE = 0x1 << 15 + MASTER_PROFILE_OEM_FIRST_RUN_BUBBLE = 0x1 << 15, + // Import home page from the default browser. + MASTER_PROFILE_IMPORT_HOME_PAGE = 0x1 << 16 }; // The master preferences is a JSON file with the same entries as the @@ -71,6 +73,7 @@ enum MasterPrefResult { // "import_search_engine": true, // "import_history": false, // "import_bookmarks": false, +// "import_home_page": false, // "create_all_shortcuts": true, // "do_not_launch_chrome": false, // "make_chrome_default": false, |