Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 436323002: Expose the profile reset UI to the command line (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698