Chromium Code Reviews| 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/ui/startup/startup_browser_creator.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> // For max(). | 9 #include <algorithm> // For max(). |
| 10 #include <set> | 10 #include <set> |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 468 profile_launch_observer.Get().Clear(); | 468 profile_launch_observer.Get().Clear(); |
| 469 } | 469 } |
| 470 | 470 |
| 471 // static | 471 // static |
| 472 void StartupBrowserCreator::RegisterLocalStatePrefs( | 472 void StartupBrowserCreator::RegisterLocalStatePrefs( |
| 473 PrefRegistrySimple* registry) { | 473 PrefRegistrySimple* registry) { |
| 474 #if defined(OS_WIN) | 474 #if defined(OS_WIN) |
| 475 registry->RegisterStringPref(prefs::kLastWelcomedOSVersion, std::string()); | 475 registry->RegisterStringPref(prefs::kLastWelcomedOSVersion, std::string()); |
| 476 registry->RegisterBooleanPref(prefs::kWelcomePageOnOSUpgradeEnabled, true); | 476 registry->RegisterBooleanPref(prefs::kWelcomePageOnOSUpgradeEnabled, true); |
| 477 #endif | 477 #endif |
| 478 registry->RegisterBooleanPref(prefs::kSuppressUnsupportedOSWarning, false); | |
|
Andrew T Wilson (Slow)
2016/03/27 09:28:44
Should this be behind a !OS_ANDROID flag?
grt (UTC plus 2)
2016/03/27 13:03:50
No. This cc file is in chrome_browser_ui_non_mobil
| |
| 478 registry->RegisterBooleanPref(prefs::kWasRestarted, false); | 479 registry->RegisterBooleanPref(prefs::kWasRestarted, false); |
| 479 } | 480 } |
| 480 | 481 |
| 481 // static | 482 // static |
| 482 std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine( | 483 std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine( |
| 483 const base::CommandLine& command_line, | 484 const base::CommandLine& command_line, |
| 484 const base::FilePath& cur_dir, | 485 const base::FilePath& cur_dir, |
| 485 Profile* profile, | 486 Profile* profile, |
| 486 bool* show_desktop_search_redirection_infobar) { | 487 bool* show_desktop_search_redirection_infobar) { |
| 487 DCHECK(profile); | 488 DCHECK(profile); |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 872 } | 873 } |
| 873 | 874 |
| 874 // If we are showing the app list then chrome isn't shown so load the app | 875 // If we are showing the app list then chrome isn't shown so load the app |
| 875 // list's profile rather than chrome's. | 876 // list's profile rather than chrome's. |
| 876 if (command_line.HasSwitch(switches::kShowAppList)) | 877 if (command_line.HasSwitch(switches::kShowAppList)) |
| 877 return AppListService::Get()->GetProfilePath(user_data_dir); | 878 return AppListService::Get()->GetProfilePath(user_data_dir); |
| 878 | 879 |
| 879 return g_browser_process->profile_manager()->GetLastUsedProfileDir( | 880 return g_browser_process->profile_manager()->GetLastUsedProfileDir( |
| 880 user_data_dir); | 881 user_data_dir); |
| 881 } | 882 } |
| OLD | NEW |