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

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

Issue 2406303003: Move enable_app_list to a buildflag. (Closed)
Patch Set: More grit defines Created 4 years, 2 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "chrome/browser/ui/browser_dialogs.h" 54 #include "chrome/browser/ui/browser_dialogs.h"
55 #include "chrome/browser/ui/browser_finder.h" 55 #include "chrome/browser/ui/browser_finder.h"
56 #include "chrome/browser/ui/browser_window.h" 56 #include "chrome/browser/ui/browser_window.h"
57 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" 57 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
58 #include "chrome/browser/ui/user_manager.h" 58 #include "chrome/browser/ui/user_manager.h"
59 #include "chrome/browser/ui/webui/settings/reset_settings_handler.h" 59 #include "chrome/browser/ui/webui/settings/reset_settings_handler.h"
60 #include "chrome/common/chrome_constants.h" 60 #include "chrome/common/chrome_constants.h"
61 #include "chrome/common/chrome_paths.h" 61 #include "chrome/common/chrome_paths.h"
62 #include "chrome/common/chrome_result_codes.h" 62 #include "chrome/common/chrome_result_codes.h"
63 #include "chrome/common/chrome_switches.h" 63 #include "chrome/common/chrome_switches.h"
64 #include "chrome/common/features.h"
64 #include "chrome/common/pref_names.h" 65 #include "chrome/common/pref_names.h"
65 #include "chrome/common/url_constants.h" 66 #include "chrome/common/url_constants.h"
66 #include "chrome/installer/util/browser_distribution.h" 67 #include "chrome/installer/util/browser_distribution.h"
67 #include "components/google/core/browser/google_util.h" 68 #include "components/google/core/browser/google_util.h"
68 #include "components/prefs/pref_registry_simple.h" 69 #include "components/prefs/pref_registry_simple.h"
69 #include "components/prefs/pref_service.h" 70 #include "components/prefs/pref_service.h"
70 #include "components/search_engines/util.h" 71 #include "components/search_engines/util.h"
71 #include "components/signin/core/common/profile_management_switches.h" 72 #include "components/signin/core/common/profile_management_switches.h"
72 #include "components/url_formatter/url_fixer.h" 73 #include "components/url_formatter/url_fixer.h"
73 #include "content/public/browser/browser_thread.h" 74 #include "content/public/browser/browser_thread.h"
(...skipping 28 matching lines...) Expand all
102 #if defined(OS_WIN) 103 #if defined(OS_WIN)
103 #include "chrome/browser/metrics/jumplist_metrics_win.h" 104 #include "chrome/browser/metrics/jumplist_metrics_win.h"
104 #endif 105 #endif
105 106
106 #if defined(ENABLE_PRINT_PREVIEW) 107 #if defined(ENABLE_PRINT_PREVIEW)
107 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 108 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
108 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 109 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
109 #include "chrome/browser/printing/print_dialog_cloud.h" 110 #include "chrome/browser/printing/print_dialog_cloud.h"
110 #endif 111 #endif
111 112
112 #if defined(ENABLE_APP_LIST) 113 #if BUILDFLAG(ENABLE_APP_LIST)
113 #include "chrome/browser/ui/app_list/app_list_service.h" 114 #include "chrome/browser/ui/app_list/app_list_service.h"
114 #endif 115 #endif
115 116
116 using content::BrowserThread; 117 using content::BrowserThread;
117 using content::ChildProcessSecurityPolicy; 118 using content::ChildProcessSecurityPolicy;
118 119
119 namespace { 120 namespace {
120 121
121 // Keeps track on which profiles have been launched. 122 // Keeps track on which profiles have been launched.
122 class ProfileLaunchObserver : public content::NotificationObserver { 123 class ProfileLaunchObserver : public content::NotificationObserver {
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 !profile_launch_observer.Get().HasBeenLaunched(profile); 865 !profile_launch_observer.Get().HasBeenLaunched(profile);
865 } 866 }
866 867
867 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir, 868 base::FilePath GetStartupProfilePath(const base::FilePath& user_data_dir,
868 const base::CommandLine& command_line) { 869 const base::CommandLine& command_line) {
869 if (command_line.HasSwitch(switches::kProfileDirectory)) { 870 if (command_line.HasSwitch(switches::kProfileDirectory)) {
870 return user_data_dir.Append( 871 return user_data_dir.Append(
871 command_line.GetSwitchValuePath(switches::kProfileDirectory)); 872 command_line.GetSwitchValuePath(switches::kProfileDirectory));
872 } 873 }
873 874
874 #if defined(ENABLE_APP_LIST) 875 #if BUILDFLAG(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);
879 #endif 880 #endif
880 881
881 return g_browser_process->profile_manager()->GetLastUsedProfileDir( 882 return g_browser_process->profile_manager()->GetLastUsedProfileDir(
882 user_data_dir); 883 user_data_dir);
883 } 884 }
884 885
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 if (!entry->IsSigninRequired()) { 948 if (!entry->IsSigninRequired()) {
948 Profile* profile = profile_manager->GetProfile(entry->GetPath()); 949 Profile* profile = profile_manager->GetProfile(entry->GetPath());
949 if (profile) 950 if (profile)
950 return profile; 951 return profile;
951 } 952 }
952 } 953 }
953 954
954 return nullptr; 955 return nullptr;
955 } 956 }
956 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 957 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « chrome/browser/ui/apps/app_info_dialog.h ('k') | chrome/browser/ui/views/apps/app_info_dialog/app_info_dialog_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698