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

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 2928823003: Make it possible to build without enable_supervised_users.
Patch Set: Does it still compile with the feature enabled? Created 3 years, 6 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
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 23 matching lines...) Expand all
34 #include "base/time/default_clock.h" 34 #include "base/time/default_clock.h"
35 #include "base/time/default_tick_clock.h" 35 #include "base/time/default_tick_clock.h"
36 #include "base/trace_event/trace_event.h" 36 #include "base/trace_event/trace_event.h"
37 #include "build/build_config.h" 37 #include "build/build_config.h"
38 #include "chrome/browser/chrome_browser_main.h" 38 #include "chrome/browser/chrome_browser_main.h"
39 #include "chrome/browser/chrome_child_process_watcher.h" 39 #include "chrome/browser/chrome_child_process_watcher.h"
40 #include "chrome/browser/chrome_content_browser_client.h" 40 #include "chrome/browser/chrome_content_browser_client.h"
41 #include "chrome/browser/chrome_device_client.h" 41 #include "chrome/browser/chrome_device_client.h"
42 #include "chrome/browser/chrome_notification_types.h" 42 #include "chrome/browser/chrome_notification_types.h"
43 #include "chrome/browser/component_updater/chrome_component_updater_configurator .h" 43 #include "chrome/browser/component_updater/chrome_component_updater_configurator .h"
44 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h "
45 #include "chrome/browser/defaults.h" 44 #include "chrome/browser/defaults.h"
46 #include "chrome/browser/devtools/devtools_auto_opener.h" 45 #include "chrome/browser/devtools/devtools_auto_opener.h"
47 #include "chrome/browser/devtools/remote_debugging_server.h" 46 #include "chrome/browser/devtools/remote_debugging_server.h"
48 #include "chrome/browser/download/download_request_limiter.h" 47 #include "chrome/browser/download/download_request_limiter.h"
49 #include "chrome/browser/download/download_status_updater.h" 48 #include "chrome/browser/download/download_status_updater.h"
50 #include "chrome/browser/gpu/gpu_mode_manager.h" 49 #include "chrome/browser/gpu/gpu_mode_manager.h"
51 #include "chrome/browser/gpu/gpu_profile_cache.h" 50 #include "chrome/browser/gpu/gpu_profile_cache.h"
52 #include "chrome/browser/icon_manager.h" 51 #include "chrome/browser/icon_manager.h"
53 #include "chrome/browser/intranet_redirect_detector.h" 52 #include "chrome/browser/intranet_redirect_detector.h"
54 #include "chrome/browser/io_thread.h" 53 #include "chrome/browser/io_thread.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 #endif 160 #endif
162 161
163 #if !defined(DISABLE_NACL) 162 #if !defined(DISABLE_NACL)
164 #include "chrome/browser/component_updater/pnacl_component_installer.h" 163 #include "chrome/browser/component_updater/pnacl_component_installer.h"
165 #endif 164 #endif
166 165
167 #if BUILDFLAG(ENABLE_PLUGINS) 166 #if BUILDFLAG(ENABLE_PLUGINS)
168 #include "chrome/browser/plugins/plugins_resource_service.h" 167 #include "chrome/browser/plugins/plugins_resource_service.h"
169 #endif 168 #endif
170 169
170 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
171 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h "
172 #endif
173
171 #if BUILDFLAG(ENABLE_WEBRTC) 174 #if BUILDFLAG(ENABLE_WEBRTC)
172 #include "chrome/browser/media/webrtc/webrtc_log_uploader.h" 175 #include "chrome/browser/media/webrtc/webrtc_log_uploader.h"
173 #endif 176 #endif
174 177
175 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) 178 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
176 #include "chrome/browser/resource_coordinator/tab_manager.h" 179 #include "chrome/browser/resource_coordinator/tab_manager.h"
177 #endif 180 #endif
178 181
179 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 182 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
180 #include "chrome/browser/first_run/upgrade_util.h" 183 #include "chrome/browser/first_run/upgrade_util.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 network_time_tracker_.reset(); 314 network_time_tracker_.reset();
312 #if BUILDFLAG(ENABLE_PLUGINS) 315 #if BUILDFLAG(ENABLE_PLUGINS)
313 plugins_resource_service_.reset(); 316 plugins_resource_service_.reset();
314 #endif 317 #endif
315 318
316 // Need to clear the desktop notification balloons before the io_thread_ and 319 // Need to clear the desktop notification balloons before the io_thread_ and
317 // before the profiles, since if there are any still showing we will access 320 // before the profiles, since if there are any still showing we will access
318 // those things during teardown. 321 // those things during teardown.
319 notification_ui_manager_.reset(); 322 notification_ui_manager_.reset();
320 323
324 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
321 // The SupervisedUserWhitelistInstaller observes the ProfileAttributesStorage, 325 // The SupervisedUserWhitelistInstaller observes the ProfileAttributesStorage,
322 // so it needs to be shut down before the ProfileManager. 326 // so it needs to be shut down before the ProfileManager.
323 supervised_user_whitelist_installer_.reset(); 327 supervised_user_whitelist_installer_.reset();
328 #endif
324 329
325 // Debugger must be cleaned up before ProfileManager. 330 // Debugger must be cleaned up before ProfileManager.
326 remote_debugging_server_.reset(); 331 remote_debugging_server_.reset();
327 devtools_auto_opener_.reset(); 332 devtools_auto_opener_.reset();
328 333
329 // Need to clear profiles (download managers) before the io_thread_. 334 // Need to clear profiles (download managers) before the io_thread_.
330 { 335 {
331 TRACE_EVENT0("shutdown", 336 TRACE_EVENT0("shutdown",
332 "BrowserProcessImpl::StartTearDown:ProfileManager"); 337 "BrowserProcessImpl::StartTearDown:ProfileManager");
333 // The desktop User Manager needs to be closed before the guest profile 338 // The desktop User Manager needs to be closed before the guest profile
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 new component_updater::PnaclComponentInstaller(); 980 new component_updater::PnaclComponentInstaller();
976 } 981 }
977 return pnacl_component_installer_.get(); 982 return pnacl_component_installer_.get();
978 #else 983 #else
979 return nullptr; 984 return nullptr;
980 #endif 985 #endif
981 } 986 }
982 987
983 component_updater::SupervisedUserWhitelistInstaller* 988 component_updater::SupervisedUserWhitelistInstaller*
984 BrowserProcessImpl::supervised_user_whitelist_installer() { 989 BrowserProcessImpl::supervised_user_whitelist_installer() {
990 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
985 if (!supervised_user_whitelist_installer_) { 991 if (!supervised_user_whitelist_installer_) {
986 supervised_user_whitelist_installer_ = 992 supervised_user_whitelist_installer_ =
987 component_updater::SupervisedUserWhitelistInstaller::Create( 993 component_updater::SupervisedUserWhitelistInstaller::Create(
988 component_updater(), 994 component_updater(),
989 &profile_manager()->GetProfileAttributesStorage(), 995 &profile_manager()->GetProfileAttributesStorage(),
990 local_state()); 996 local_state());
991 } 997 }
992 return supervised_user_whitelist_installer_.get(); 998 return supervised_user_whitelist_installer_.get();
999 #else
1000 return nullptr;
1001 #endif
993 } 1002 }
994 1003
995 void BrowserProcessImpl::ResourceDispatcherHostCreated() { 1004 void BrowserProcessImpl::ResourceDispatcherHostCreated() {
996 resource_dispatcher_host_delegate_.reset( 1005 resource_dispatcher_host_delegate_.reset(
997 new ChromeResourceDispatcherHostDelegate); 1006 new ChromeResourceDispatcherHostDelegate);
998 ResourceDispatcherHost::Get()->SetDelegate( 1007 ResourceDispatcherHost::Get()->SetDelegate(
999 resource_dispatcher_host_delegate_.get()); 1008 resource_dispatcher_host_delegate_.get());
1000 1009
1001 pref_change_registrar_.Add( 1010 pref_change_registrar_.Add(
1002 prefs::kAllowCrossOriginAuthPrompt, 1011 prefs::kAllowCrossOriginAuthPrompt,
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 } 1431 }
1423 1432
1424 void BrowserProcessImpl::OnAutoupdateTimer() { 1433 void BrowserProcessImpl::OnAutoupdateTimer() {
1425 if (CanAutorestartForUpdate()) { 1434 if (CanAutorestartForUpdate()) {
1426 DLOG(WARNING) << "Detected update. Restarting browser."; 1435 DLOG(WARNING) << "Detected update. Restarting browser.";
1427 RestartBackgroundInstance(); 1436 RestartBackgroundInstance();
1428 } 1437 }
1429 } 1438 }
1430 1439
1431 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1440 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698