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

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

Issue 10756023: Fix the first_run regression issue related to skip_first_run_ui setting processing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change back to SkipFirstRunUI. Created 8 years, 5 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 | Annotate | Revision Log
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/first_run/first_run.h" 5 #include "chrome/browser/first_run/first_run.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 installer::MasterPreferences* install_prefs) { 260 installer::MasterPreferences* install_prefs) {
261 bool value = false; 261 bool value = false;
262 if (install_prefs->GetBool( 262 if (install_prefs->GetBool(
263 installer::master_preferences::kDistroShowWelcomePage, &value) 263 installer::master_preferences::kDistroShowWelcomePage, &value)
264 && value) { 264 && value) {
265 SetShowWelcomePagePref(); 265 SetShowWelcomePagePref();
266 } 266 }
267 } 267 }
268 268
269 bool SkipFirstRunUI(installer::MasterPreferences* install_prefs) { 269 bool SkipFirstRunUI(installer::MasterPreferences* install_prefs) {
270 // TODO(mirandac): Refactor skip-first-run-ui process into regular first run
271 // import process. http://crbug.com/49647
272 // Note we are skipping all other master preferences if skip-first-run-ui
273 // is *not* specified. (That is, we continue only if skipping first run ui.)
274 bool value = false; 270 bool value = false;
275 return (install_prefs->GetBool( 271 install_prefs->GetBool(installer::master_preferences::kDistroSkipFirstRunPref,
276 installer::master_preferences::kDistroSkipFirstRunPref, 272 &value);
277 &value) || !value); 273 return value;
278 } 274 }
279 275
280 void SetRLZPref(first_run::MasterPrefs* out_prefs, 276 void SetRLZPref(first_run::MasterPrefs* out_prefs,
281 installer::MasterPreferences* install_prefs) { 277 installer::MasterPreferences* install_prefs) {
282 if (!install_prefs->GetInt(installer::master_preferences::kDistroPingDelay, 278 if (!install_prefs->GetInt(installer::master_preferences::kDistroPingDelay,
283 &out_prefs->ping_delay)) { 279 &out_prefs->ping_delay)) {
284 // Default value in case master preferences is missing or corrupt, 280 // Default value in case master preferences is missing or corrupt,
285 // or ping_delay is missing. 281 // or ping_delay is missing.
286 out_prefs->ping_delay = 90; 282 out_prefs->ping_delay = 90;
287 } 283 }
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 537
542 // Reset the preference and notifications to avoid showing the bubble again. 538 // Reset the preference and notifications to avoid showing the bubble again.
543 prefs->SetBoolean(prefs::kShouldShowFirstRunBubble, false); 539 prefs->SetBoolean(prefs::kShouldShowFirstRunBubble, false);
544 540
545 // Show the bubble now and destroy this bubble launcher. 541 // Show the bubble now and destroy this bubble launcher.
546 browser->ShowFirstRunBubble(); 542 browser->ShowFirstRunBubble();
547 delete this; 543 delete this;
548 } 544 }
549 545
550 } // namespace first_run 546 } // namespace first_run
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run_internal.h » ('j') | chrome/browser/first_run/first_run_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698