| OLD | NEW |
| 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 Loading... |
| 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) && |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |