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

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

Issue 1861233003: Prepare for building with enable_app_list=0 on Desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: drop patchset dependency, rebase to master Created 4 years, 7 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> // For max(). 9 #include <algorithm> // For max().
10 #include <memory> 10 #include <memory>
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 !profile_launch_observer.Get().HasBeenLaunched(profile); 865 !profile_launch_observer.Get().HasBeenLaunched(profile);
866 } 866 }
867 867
868 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir, 868 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir,
869 const base::CommandLine& command_line) { 869 const base::CommandLine& command_line) {
870 if (command_line.HasSwitch(switches::kProfileDirectory)) { 870 if (command_line.HasSwitch(switches::kProfileDirectory)) {
871 return user_data_dir.Append( 871 return user_data_dir.Append(
872 command_line.GetSwitchValuePath(switches::kProfileDirectory)); 872 command_line.GetSwitchValuePath(switches::kProfileDirectory));
873 } 873 }
874 874
875 #if defined(ENABLE_APP_LIST)
875 // If we are showing the app list then chrome isn't shown so load the app 876 // If we are showing the app list then chrome isn't shown so load the app
876 // list's profile rather than chrome's. 877 // list's profile rather than chrome's.
877 if (command_line.HasSwitch(switches::kShowAppList)) 878 if (command_line.HasSwitch(switches::kShowAppList))
878 return AppListService::Get()->GetProfilePath(user_data_dir); 879 return AppListService::Get()->GetProfilePath(user_data_dir);
880 #endif
879 881
880 return g_browser_process->profile_manager()->GetLastUsedProfileDir( 882 return g_browser_process->profile_manager()->GetLastUsedProfileDir(
881 user_data_dir); 883 user_data_dir);
882 } 884 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698