OLD | NEW |
---|---|
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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 #include "chrome/browser/chromeos/power/power_button_observer.h" | 70 #include "chrome/browser/chromeos/power/power_button_observer.h" |
71 #include "chrome/browser/chromeos/power/power_data_collector.h" | 71 #include "chrome/browser/chromeos/power/power_data_collector.h" |
72 #include "chrome/browser/chromeos/power/power_prefs.h" | 72 #include "chrome/browser/chromeos/power/power_prefs.h" |
73 #include "chrome/browser/chromeos/power/renderer_freezer.h" | 73 #include "chrome/browser/chromeos/power/renderer_freezer.h" |
74 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 74 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
75 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" | 75 #include "chrome/browser/chromeos/resource_reporter/resource_reporter.h" |
76 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " | 76 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " |
77 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 77 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
78 #include "chrome/browser/chromeos/status/data_promo_notification.h" | 78 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
79 #include "chrome/browser/chromeos/system/input_device_settings.h" | 79 #include "chrome/browser/chromeos/system/input_device_settings.h" |
80 #include "chrome/browser/chromeos/ui/low_disk_notification.h" | |
80 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 81 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
81 #include "chrome/browser/defaults.h" | 82 #include "chrome/browser/defaults.h" |
82 #include "chrome/browser/lifetime/application_lifetime.h" | 83 #include "chrome/browser/lifetime/application_lifetime.h" |
83 #include "chrome/browser/net/chrome_network_delegate.h" | 84 #include "chrome/browser/net/chrome_network_delegate.h" |
84 #include "chrome/browser/profiles/profile.h" | 85 #include "chrome/browser/profiles/profile.h" |
85 #include "chrome/browser/profiles/profile_manager.h" | 86 #include "chrome/browser/profiles/profile_manager.h" |
86 #include "chrome/browser/ui/ash/ash_util.h" | 87 #include "chrome/browser/ui/ash/ash_util.h" |
87 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" | 88 #include "chrome/browser/ui/ash/network_connect_delegate_chromeos.h" |
88 #include "chrome/common/channel_info.h" | 89 #include "chrome/common/channel_info.h" |
89 #include "chrome/common/chrome_constants.h" | 90 #include "chrome/common/chrome_constants.h" |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
673 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); | 674 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); |
674 | 675 |
675 // Tell the window manager observer to monitor window manager changes. To do | 676 // Tell the window manager observer to monitor window manager changes. To do |
676 // so, the ash::shell needs to be available (which it is now). | 677 // so, the ash::shell needs to be available (which it is now). |
677 if (arc::ArcBridgeService::GetEnabled( | 678 if (arc::ArcBridgeService::GetEnabled( |
678 base::CommandLine::ForCurrentProcess())) { | 679 base::CommandLine::ForCurrentProcess())) { |
679 DCHECK(arc::ArcServiceManager::Get()); | 680 DCHECK(arc::ArcServiceManager::Get()); |
680 arc::ArcServiceManager::Get()->OnAshStarted(); | 681 arc::ArcServiceManager::Get()->OnAshStarted(); |
681 } | 682 } |
682 | 683 |
684 // Start watching for low disk space events to notify the user. | |
685 low_disk_notification_.reset( | |
686 new LowDiskNotification(DBusThreadManager::Get()->GetCryptohomeClient())); | |
yoshiki
2016/06/23 08:00:45
Please free this instance explicitly before DBusTh
dspaid
2016/06/27 05:40:04
Done.
| |
687 | |
683 ChromeBrowserMainPartsLinux::PostProfileInit(); | 688 ChromeBrowserMainPartsLinux::PostProfileInit(); |
684 } | 689 } |
685 | 690 |
686 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { | 691 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { |
687 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 692 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
688 // -- just before MetricsService::LogNeedForCleanShutdown(). | 693 // -- just before MetricsService::LogNeedForCleanShutdown(). |
689 | 694 |
690 // Start the external metrics service, which collects metrics from Chrome OS | 695 // Start the external metrics service, which collects metrics from Chrome OS |
691 // and passes them to the browser process. | 696 // and passes them to the browser process. |
692 external_metrics_ = new chromeos::ExternalMetrics; | 697 external_metrics_ = new chromeos::ExternalMetrics; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
870 // Destroy DBus services immediately after threads are stopped. | 875 // Destroy DBus services immediately after threads are stopped. |
871 dbus_services_.reset(); | 876 dbus_services_.reset(); |
872 | 877 |
873 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 878 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
874 | 879 |
875 // Destroy DeviceSettingsService after g_browser_process. | 880 // Destroy DeviceSettingsService after g_browser_process. |
876 DeviceSettingsService::Shutdown(); | 881 DeviceSettingsService::Shutdown(); |
877 } | 882 } |
878 | 883 |
879 } // namespace chromeos | 884 } // namespace chromeos |
OLD | NEW |