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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 692383005: Add DeviceDisablingManager to manage device disabling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@f_3_425574_disable_header_bar
Patch Set: Move the parsing of the disabled message to DeviceDisablingManager as well. Created 6 years, 1 month 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromeos/chrome_browser_main_chromeos.h" 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 583
584 peripheral_battery_observer_.reset(new PeripheralBatteryObserver()); 584 peripheral_battery_observer_.reset(new PeripheralBatteryObserver());
585 585
586 renderer_freezer_.reset( 586 renderer_freezer_.reset(
587 new RendererFreezer(scoped_ptr<RendererFreezer::Delegate>( 587 new RendererFreezer(scoped_ptr<RendererFreezer::Delegate>(
588 new FreezerCgroupProcessManager()))); 588 new FreezerCgroupProcessManager())));
589 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWakeOnPackets)) 589 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kWakeOnPackets))
590 light_bar_.reset(new LightBar()); 590 light_bar_.reset(new LightBar());
591 591
592 g_browser_process->platform_part()->InitializeAutomaticRebootManager(); 592 g_browser_process->platform_part()->InitializeAutomaticRebootManager();
593 g_browser_process->platform_part()->InitializeDeviceDisablingManager();
593 594
594 // This observer cannot be created earlier because it requires the shell to be 595 // This observer cannot be created earlier because it requires the shell to be
595 // available. 596 // available.
596 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); 597 idle_action_warning_observer_.reset(new IdleActionWarningObserver());
597 598
598 ChromeBrowserMainPartsLinux::PostProfileInit(); 599 ChromeBrowserMainPartsLinux::PostProfileInit();
599 } 600 }
600 601
601 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { 602 void ChromeBrowserMainPartsChromeos::PreBrowserStart() {
602 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 603 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 744
744 // Let the UserManager and WallpaperManager unregister itself as an observer 745 // Let the UserManager and WallpaperManager unregister itself as an observer
745 // of the CrosSettings singleton before it is destroyed. This also ensures 746 // of the CrosSettings singleton before it is destroyed. This also ensures
746 // that the UserManager has no URLRequest pending (see 747 // that the UserManager has no URLRequest pending (see
747 // http://crbug.com/276659). 748 // http://crbug.com/276659).
748 g_browser_process->platform_part()->user_manager()->Shutdown(); 749 g_browser_process->platform_part()->user_manager()->Shutdown();
749 #if !defined(USE_ATHENA) 750 #if !defined(USE_ATHENA)
750 WallpaperManager::Get()->Shutdown(); 751 WallpaperManager::Get()->Shutdown();
751 #endif 752 #endif
752 753
754 g_browser_process->platform_part()->ShutdownDeviceDisablingManager();
755
753 // Let the AutomaticRebootManager unregister itself as an observer of several 756 // Let the AutomaticRebootManager unregister itself as an observer of several
754 // subsystems. 757 // subsystems.
755 g_browser_process->platform_part()->ShutdownAutomaticRebootManager(); 758 g_browser_process->platform_part()->ShutdownAutomaticRebootManager();
756 759
757 // Clean up dependency on CrosSettings and stop pending data fetches. 760 // Clean up dependency on CrosSettings and stop pending data fetches.
758 KioskAppManager::Shutdown(); 761 KioskAppManager::Shutdown();
759 762
760 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers 763 // Give BrowserPolicyConnectorChromeOS a chance to unregister any observers
761 // on services that are going to be deleted later but before its Shutdown() 764 // on services that are going to be deleted later but before its Shutdown()
762 // is called. 765 // is called.
(...skipping 24 matching lines...) Expand all
787 // Destroy DBus services immediately after threads are stopped. 790 // Destroy DBus services immediately after threads are stopped.
788 dbus_services_.reset(); 791 dbus_services_.reset();
789 792
790 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 793 ChromeBrowserMainPartsLinux::PostDestroyThreads();
791 794
792 // Destroy DeviceSettingsService after g_browser_process. 795 // Destroy DeviceSettingsService after g_browser_process.
793 DeviceSettingsService::Shutdown(); 796 DeviceSettingsService::Shutdown();
794 } 797 }
795 798
796 } // namespace chromeos 799 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698