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

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

Issue 1226643002: Welcome page changes for Windows 10 and over. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix RestoreOnStartupURLsPolicySpecified Created 5 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
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 544
545 out_prefs->compressed_variations_seed = 545 out_prefs->compressed_variations_seed =
546 install_prefs.GetCompressedVariationsSeed(); 546 install_prefs.GetCompressedVariationsSeed();
547 out_prefs->variations_seed = install_prefs.GetVariationsSeed(); 547 out_prefs->variations_seed = install_prefs.GetVariationsSeed();
548 out_prefs->variations_seed_signature = 548 out_prefs->variations_seed_signature =
549 install_prefs.GetVariationsSeedSignature(); 549 install_prefs.GetVariationsSeedSignature();
550 550
551 install_prefs.GetString( 551 install_prefs.GetString(
552 installer::master_preferences::kDistroSuppressDefaultBrowserPromptPref, 552 installer::master_preferences::kDistroSuppressDefaultBrowserPromptPref,
553 &out_prefs->suppress_default_browser_prompt_for_version); 553 &out_prefs->suppress_default_browser_prompt_for_version);
554
555 if (install_prefs.GetBool(
556 installer::master_preferences::kDistroWelcomePageOnOSUpgradeEnabled,
557 &value) &&
gab 2015/07/09 18:05:11 |value| is unchanged if this returns false (i.e. t
grt (UTC plus 2) 2015/07/10 15:43:24 I don't understand. The default value is used if t
558 !value) {
559 out_prefs->welcome_page_on_os_upgrade_enabled = false;
560 }
554 } 561 }
555 562
556 bool GetFirstRunSentinelFilePath(base::FilePath* path) { 563 bool GetFirstRunSentinelFilePath(base::FilePath* path) {
557 base::FilePath user_data_dir; 564 base::FilePath user_data_dir;
558 if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) 565 if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir))
559 return false; 566 return false;
560 *path = user_data_dir.Append(chrome::kFirstRunSentinel); 567 *path = user_data_dir.Append(chrome::kFirstRunSentinel);
561 return true; 568 return true;
562 } 569 }
563 570
(...skipping 14 matching lines...) Expand all
578 #endif 585 #endif
579 586
580 } // namespace internal 587 } // namespace internal
581 588
582 MasterPrefs::MasterPrefs() 589 MasterPrefs::MasterPrefs()
583 : ping_delay(0), 590 : ping_delay(0),
584 homepage_defined(false), 591 homepage_defined(false),
585 do_import_items(0), 592 do_import_items(0),
586 dont_import_items(0), 593 dont_import_items(0),
587 make_chrome_default_for_user(false), 594 make_chrome_default_for_user(false),
588 suppress_first_run_default_browser_prompt(false) { 595 suppress_first_run_default_browser_prompt(false),
596 welcome_page_on_os_upgrade_enabled(true) {
589 } 597 }
590 598
591 MasterPrefs::~MasterPrefs() {} 599 MasterPrefs::~MasterPrefs() {}
592 600
593 bool IsChromeFirstRun() { 601 bool IsChromeFirstRun() {
594 if (internal::g_first_run == internal::FIRST_RUN_UNKNOWN) { 602 if (internal::g_first_run == internal::FIRST_RUN_UNKNOWN) {
595 internal::g_first_run = internal::FIRST_RUN_FALSE; 603 internal::g_first_run = internal::FIRST_RUN_FALSE;
596 const base::CommandLine* command_line = 604 const base::CommandLine* command_line =
597 base::CommandLine::ForCurrentProcess(); 605 base::CommandLine::ForCurrentProcess();
598 if (command_line->HasSwitch(switches::kForceFirstRun) || 606 if (command_line->HasSwitch(switches::kForceFirstRun) ||
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 SetShouldDoPersonalDataManagerFirstRun(); 812 SetShouldDoPersonalDataManagerFirstRun();
805 813
806 internal::DoPostImportPlatformSpecificTasks(profile); 814 internal::DoPostImportPlatformSpecificTasks(profile);
807 } 815 }
808 816
809 uint16 auto_import_state() { 817 uint16 auto_import_state() {
810 return g_auto_import_state; 818 return g_auto_import_state;
811 } 819 }
812 820
813 } // namespace first_run 821 } // namespace first_run
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698