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

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: 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 void SetShowWelcomePagePrefIfNeeded( 259 void SetShowWelcomePagePrefIfNeeded(
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 NotSkipFirstRunUI(installer::MasterPreferences* install_prefs) {
msw 2012/07/10 01:51:21 I dislike this name, please leave it SkipFirstRunU
jennyz 2012/07/10 16:07:16 Done.
270 // TODO(mirandac): Refactor skip-first-run-ui process into regular first run 270 // TODO(mirandac): Refactor skip-first-run-ui process into regular first run
271 // import process. http://crbug.com/49647 271 // import process. http://crbug.com/49647
272 // Note we are skipping all other master preferences if skip-first-run-ui 272 // Note we are skipping all other master preferences if skip-first-run-ui
msw 2012/07/10 01:51:21 This note/comment belong with the code that actual
jennyz 2012/07/10 16:07:16 Done.
273 // is *not* specified. (That is, we continue only if skipping first run ui.) 273 // is *not* specified. (That is, we continue only if skipping first run ui.)
274 bool value = false; 274 bool value = false;
275 return (install_prefs->GetBool( 275 return (!install_prefs->GetBool(
msw 2012/07/10 01:51:21 In keeping the original name, this function can ju
jennyz 2012/07/10 16:07:16 Done.
276 installer::master_preferences::kDistroSkipFirstRunPref, 276 installer::master_preferences::kDistroSkipFirstRunPref, &value)
277 &value) || !value); 277 || !value);
278 } 278 }
279 279
280 void SetRLZPref(first_run::MasterPrefs* out_prefs, 280 void SetRLZPref(first_run::MasterPrefs* out_prefs,
281 installer::MasterPreferences* install_prefs) { 281 installer::MasterPreferences* install_prefs) {
282 if (!install_prefs->GetInt(installer::master_preferences::kDistroPingDelay, 282 if (!install_prefs->GetInt(installer::master_preferences::kDistroPingDelay,
283 &out_prefs->ping_delay)) { 283 &out_prefs->ping_delay)) {
284 // Default value in case master preferences is missing or corrupt, 284 // Default value in case master preferences is missing or corrupt,
285 // or ping_delay is missing. 285 // or ping_delay is missing.
286 out_prefs->ping_delay = 90; 286 out_prefs->ping_delay = 90;
287 } 287 }
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 541
542 // Reset the preference and notifications to avoid showing the bubble again. 542 // Reset the preference and notifications to avoid showing the bubble again.
543 prefs->SetBoolean(prefs::kShouldShowFirstRunBubble, false); 543 prefs->SetBoolean(prefs::kShouldShowFirstRunBubble, false);
544 544
545 // Show the bubble now and destroy this bubble launcher. 545 // Show the bubble now and destroy this bubble launcher.
546 browser->ShowFirstRunBubble(); 546 browser->ShowFirstRunBubble();
547 delete this; 547 delete this;
548 } 548 }
549 549
550 } // namespace first_run 550 } // 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_internal.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698