Commit 254ce9f7 authored by jennyz@google.com's avatar jennyz@google.com

Fix the first_run regression issue related to skip_first_run_ui setting processing.

BUG=132353
TEST=First run bubble should appear if skip_first_run_ui is set to false.

Review URL: https://chromiumcodereview.appspot.com/10756023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145986 0039d316-1c4b-4281-b951-d872f2087c98
parent 3585e8e5
...@@ -267,14 +267,10 @@ void SetShowWelcomePagePrefIfNeeded( ...@@ -267,14 +267,10 @@ void SetShowWelcomePagePrefIfNeeded(
} }
bool SkipFirstRunUI(installer::MasterPreferences* install_prefs) { bool SkipFirstRunUI(installer::MasterPreferences* install_prefs) {
// TODO(mirandac): Refactor skip-first-run-ui process into regular first run
// import process. http://crbug.com/49647
// Note we are skipping all other master preferences if skip-first-run-ui
// is *not* specified. (That is, we continue only if skipping first run ui.)
bool value = false; bool value = false;
return (install_prefs->GetBool( install_prefs->GetBool(installer::master_preferences::kDistroSkipFirstRunPref,
installer::master_preferences::kDistroSkipFirstRunPref, &value);
&value) || !value); return value;
} }
void SetRLZPref(first_run::MasterPrefs* out_prefs, void SetRLZPref(first_run::MasterPrefs* out_prefs,
......
...@@ -63,7 +63,9 @@ void SetShowWelcomePagePrefIfNeeded( ...@@ -63,7 +63,9 @@ void SetShowWelcomePagePrefIfNeeded(
void SetDefaultBrowser(installer::MasterPreferences* install_prefs); void SetDefaultBrowser(installer::MasterPreferences* install_prefs);
// Returns true if the first-run-ui process should be skipped. // Returns true if first run ui should be skipped, which is the case that
// skip_first_run_ui setting is set to true. In the case the setting is
// not found or specified, it returns false by default.
bool SkipFirstRunUI(installer::MasterPreferences* install_prefs); bool SkipFirstRunUI(installer::MasterPreferences* install_prefs);
// Sets ping_delay. // Sets ping_delay.
......
...@@ -147,6 +147,10 @@ bool ProcessMasterPreferences(const FilePath& user_data_dir, ...@@ -147,6 +147,10 @@ bool ProcessMasterPreferences(const FilePath& user_data_dir,
internal::SetupMasterPrefsFromInstallPrefs(out_prefs, internal::SetupMasterPrefsFromInstallPrefs(out_prefs,
install_prefs.get()); install_prefs.get());
// TODO(mirandac): Refactor skip-first-run-ui process into regular first run
// import process. http://crbug.com/49647
// Note we are skipping all other master preferences if skip-first-run-ui
// is *not* specified. (That is, we continue only if skipping first run ui.)
if (!internal::SkipFirstRunUI(install_prefs.get())) if (!internal::SkipFirstRunUI(install_prefs.get()))
return true; return true;
......
...@@ -594,6 +594,10 @@ bool ProcessMasterPreferences(const FilePath& user_data_dir, ...@@ -594,6 +594,10 @@ bool ProcessMasterPreferences(const FilePath& user_data_dir,
internal::SetupMasterPrefsFromInstallPrefs(out_prefs, internal::SetupMasterPrefsFromInstallPrefs(out_prefs,
install_prefs.get()); install_prefs.get());
// TODO(mirandac): Refactor skip-first-run-ui process into regular first run
// import process. http://crbug.com/49647
// Note we are skipping all other master preferences if skip-first-run-ui
// is *not* specified. (That is, we continue only if skipping first run ui.)
if (!internal::SkipFirstRunUI(install_prefs.get())) if (!internal::SkipFirstRunUI(install_prefs.get()))
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment