Index: chrome/browser/chrome_browser_main.cc |
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
index 224438dabaeaa1c9970c8a710b04250ee8fd7e01..d0c225b45ce7166a24aef6cff2206686a5ba1272 100644 |
--- a/chrome/browser/chrome_browser_main.cc |
+++ b/chrome/browser/chrome_browser_main.cc |
@@ -337,7 +337,6 @@ PrefService* InitializeLocalState( |
// a fallback profile. Returns the newly created profile, or NULL if startup |
// should not continue. |
Profile* CreatePrimaryProfile(const content::MainFunctionParams& parameters, |
- const base::FilePath& user_data_dir, |
const base::CommandLine& parsed_command_line) { |
TRACE_EVENT0("startup", "ChromeBrowserMainParts::CreateProfile") |
TRACK_SCOPED_REGION( |
@@ -361,12 +360,9 @@ Profile* CreatePrimaryProfile(const content::MainFunctionParams& parameters, |
// On ChromeOS and Android the ProfileManager will use the same path as the |
// one we got passed. GetActiveUserProfile will therefore use the correct path |
// automatically. |
- DCHECK_EQ(user_data_dir.value(), |
- g_browser_process->profile_manager()->user_data_dir().value()); |
profile = ProfileManager::GetActiveUserProfile(); |
#else |
- base::FilePath profile_path = |
- GetStartupProfilePath(user_data_dir, parsed_command_line); |
+ base::FilePath profile_path = GetStartupProfilePath(parsed_command_line); |
// Without NewAvatarMenu, replace guest with any existing profile. |
if (!switches::IsNewAvatarMenu() && |
@@ -374,8 +370,7 @@ Profile* CreatePrimaryProfile(const content::MainFunctionParams& parameters, |
profile_path = g_browser_process->profile_manager()->GetProfileInfoCache(). |
GetPathOfProfileAtIndex(0); |
} |
- profile = g_browser_process->profile_manager()->GetProfile( |
- profile_path); |
+ profile = g_browser_process->profile_manager()->GetProfile(profile_path); |
// If we're using the --new-profile-management flag and this profile is |
// signed out, then we should show the user manager instead. By switching |
@@ -509,10 +504,7 @@ bool ProcessSingletonNotificationCallback( |
g_browser_process->platform_part()->PlatformSpecificCommandLineProcessing( |
command_line); |
- base::FilePath user_data_dir = |
- g_browser_process->profile_manager()->user_data_dir(); |
- base::FilePath startup_profile_dir = |
- GetStartupProfilePath(user_data_dir, command_line); |
+ base::FilePath startup_profile_dir = GetStartupProfilePath(command_line); |
StartupBrowserCreator::ProcessCommandLineAlreadyRunning( |
command_line, current_directory, startup_profile_dir); |
@@ -1350,7 +1342,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
// This step is costly and is already measured in Startup.CreateFirstProfile |
// and more directly Profile.CreateAndInitializeProfile. |
profile_ = CreatePrimaryProfile(parameters(), |
- user_data_dir_, |
parsed_command_line()); |
if (!profile_) |
return content::RESULT_CODE_NORMAL_EXIT; |