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 base::ThreadRestrictions::ScopedAllowIO allow_io; | 437 base::ThreadRestrictions::ScopedAllowIO allow_io; |
438 url = url_fixer::FixupRelativeFile(cur_dir, param); | 438 url = url_fixer::FixupRelativeFile(cur_dir, param); |
439 } | 439 } |
440 // Exclude dangerous schemes. | 440 // Exclude dangerous schemes. |
441 if (url.is_valid()) { | 441 if (url.is_valid()) { |
442 ChildProcessSecurityPolicy* policy = | 442 ChildProcessSecurityPolicy* policy = |
443 ChildProcessSecurityPolicy::GetInstance(); | 443 ChildProcessSecurityPolicy::GetInstance(); |
444 if (policy->IsWebSafeScheme(url.scheme()) || | 444 if (policy->IsWebSafeScheme(url.scheme()) || |
445 url.SchemeIs(url::kFileScheme) || | 445 url.SchemeIs(url::kFileScheme) || |
446 #if defined(OS_CHROMEOS) | 446 #if defined(OS_CHROMEOS) |
447 // In ChromeOS, allow a settings page to be specified on the | 447 // In ChromeOS, allow any settings page to be specified on the command |
448 // command line. See ExistingUserController::OnLoginSuccess. | 448 // line. See ExistingUserController::OnLoginSuccess. |
449 (url.spec().find(chrome::kChromeUISettingsURL) == 0) || | 449 (url.spec().find(chrome::kChromeUISettingsURL) == 0) || |
| 450 #else |
| 451 ((url.spec().find(std::string(chrome::kChromeUISettingsURL) + |
| 452 chrome::kResetProfileSettingsSubPage) == 0)) || |
450 #endif | 453 #endif |
451 (url.spec().compare(url::kAboutBlankURL) == 0)) { | 454 (url.spec().compare(url::kAboutBlankURL) == 0)) { |
452 urls.push_back(url); | 455 urls.push_back(url); |
453 } | 456 } |
454 } | 457 } |
455 } | 458 } |
456 return urls; | 459 return urls; |
457 } | 460 } |
458 | 461 |
459 // static | 462 // static |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 } | 738 } |
736 | 739 |
737 if (command_line.HasSwitch(switches::kProfileDirectory)) { | 740 if (command_line.HasSwitch(switches::kProfileDirectory)) { |
738 return user_data_dir.Append( | 741 return user_data_dir.Append( |
739 command_line.GetSwitchValuePath(switches::kProfileDirectory)); | 742 command_line.GetSwitchValuePath(switches::kProfileDirectory)); |
740 } | 743 } |
741 | 744 |
742 return g_browser_process->profile_manager()->GetLastUsedProfileDir( | 745 return g_browser_process->profile_manager()->GetLastUsedProfileDir( |
743 user_data_dir); | 746 user_data_dir); |
744 } | 747 } |
OLD | NEW |