| 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 <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "apps/app_load_service.h" | 10 #include "apps/app_load_service.h" |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 if (url.is_valid()) { | 437 if (url.is_valid()) { |
| 438 ChildProcessSecurityPolicy* policy = | 438 ChildProcessSecurityPolicy* policy = |
| 439 ChildProcessSecurityPolicy::GetInstance(); | 439 ChildProcessSecurityPolicy::GetInstance(); |
| 440 if (policy->IsWebSafeScheme(url.scheme()) || | 440 if (policy->IsWebSafeScheme(url.scheme()) || |
| 441 url.SchemeIs(url::kFileScheme) || | 441 url.SchemeIs(url::kFileScheme) || |
| 442 #if defined(OS_CHROMEOS) | 442 #if defined(OS_CHROMEOS) |
| 443 // In ChromeOS, allow a settings page to be specified on the | 443 // In ChromeOS, allow a settings page to be specified on the |
| 444 // command line. See ExistingUserController::OnLoginSuccess. | 444 // command line. See ExistingUserController::OnLoginSuccess. |
| 445 (url.spec().find(chrome::kChromeUISettingsURL) == 0) || | 445 (url.spec().find(chrome::kChromeUISettingsURL) == 0) || |
| 446 #endif | 446 #endif |
| 447 (url.spec().compare(content::kAboutBlankURL) == 0)) { | 447 (url.spec().compare(url::kAboutBlankURL) == 0)) { |
| 448 urls.push_back(url); | 448 urls.push_back(url); |
| 449 } | 449 } |
| 450 } | 450 } |
| 451 } | 451 } |
| 452 return urls; | 452 return urls; |
| 453 } | 453 } |
| 454 | 454 |
| 455 // static | 455 // static |
| 456 bool StartupBrowserCreator::ProcessCmdLineImpl( | 456 bool StartupBrowserCreator::ProcessCmdLineImpl( |
| 457 const CommandLine& command_line, | 457 const CommandLine& command_line, |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 } | 728 } |
| 729 | 729 |
| 730 if (command_line.HasSwitch(switches::kProfileDirectory)) { | 730 if (command_line.HasSwitch(switches::kProfileDirectory)) { |
| 731 return user_data_dir.Append( | 731 return user_data_dir.Append( |
| 732 command_line.GetSwitchValuePath(switches::kProfileDirectory)); | 732 command_line.GetSwitchValuePath(switches::kProfileDirectory)); |
| 733 } | 733 } |
| 734 | 734 |
| 735 return g_browser_process->profile_manager()->GetLastUsedProfileDir( | 735 return g_browser_process->profile_manager()->GetLastUsedProfileDir( |
| 736 user_data_dir); | 736 user_data_dir); |
| 737 } | 737 } |
| OLD | NEW |