diff options
author | grt <grt@chromium.org> | 2015-07-14 08:11:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-14 15:12:16 +0000 |
commit | f14398c95a77206066cbab24b45070a85aba469a (patch) | |
tree | 99052aad604bbe18966cc8795f832137906256d2 /chrome/browser/browser_process_impl.cc | |
parent | 98dd4e8b6b6f42dbc9734a4c834c8471d9079224 (diff) | |
download | chromium_src-f14398c95a77206066cbab24b45070a85aba469a.zip chromium_src-f14398c95a77206066cbab24b45070a85aba469a.tar.gz chromium_src-f14398c95a77206066cbab24b45070a85aba469a.tar.bz2 |
Welcome page changes for Windows 10.
* Show the welcome page on the first launch following OS upgrades to or
past Windows 10 when Chrome is not the default browser unless the
WelcomePageOnOSUpgradeEnabled policy setting is set to false or the
welcome_page_on_os_upgrade_enabled distribution master_preferences
value is set to false.
* Suppress showing the signin promo during first-run on Windows 10 and
instead show the welcome page before the NTP.
BUG=505029
TEST=On Windows 8.1 and older, nothing changes. On Windows 10, the
signin promo is no longer shown on first run; rather, the welcome page
and the NTP are shown. On Windows 10, the welcome page is shown on the
first ordinary launch (for all "On startup" settings except when an URL
is provided on the command line) following an upgrade from an earlier
version of Windows when Chrome is not the default browser.
Review URL: https://codereview.chromium.org/1226643002
Cr-Commit-Position: refs/heads/master@{#338688}
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 330ff8a..53d73e9 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -183,7 +183,8 @@ BrowserProcessImpl::BrowserProcessImpl( module_ref_count_(0), did_start_(false), download_status_updater_(new DownloadStatusUpdater), - local_state_task_runner_(local_state_task_runner) { + local_state_task_runner_(local_state_task_runner), + cached_default_web_client_state_(ShellIntegration::UNKNOWN_DEFAULT) { g_browser_process = this; platform_part_.reset(new BrowserProcessPlatformPart()); @@ -782,6 +783,11 @@ memory::OomPriorityManager* BrowserProcessImpl::GetOomPriorityManager() { #endif } +ShellIntegration::DefaultWebClientState +BrowserProcessImpl::CachedDefaultWebClientState() { + return cached_default_web_client_state_; +} + // static void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, @@ -1081,6 +1087,8 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { child_process_watcher_.reset(new ChromeChildProcessWatcher()); + CacheDefaultWebClientState(); + platform_part_->PreMainMessageLoopRun(); } @@ -1192,6 +1200,14 @@ void BrowserProcessImpl::ApplyMetricsReportingPolicy() { #endif } +void BrowserProcessImpl::CacheDefaultWebClientState() { +#if defined(OS_CHROMEOS) + cached_default_web_client_state_ = ShellIntegration::IS_DEFAULT; +#elif !defined(OS_ANDROID) && !defined(OS_IOS) + cached_default_web_client_state_ = ShellIntegration::GetDefaultBrowser(); +#endif +} + // Mac is currently not supported. #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |