| 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 <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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 #include "chrome/browser/chromeos/power/screen_lock_observer.h" | 66 #include "chrome/browser/chromeos/power/screen_lock_observer.h" |
| 67 #include "chrome/browser/chromeos/power/suspend_observer.h" | 67 #include "chrome/browser/chromeos/power/suspend_observer.h" |
| 68 #include "chrome/browser/chromeos/power/user_activity_notifier.h" | 68 #include "chrome/browser/chromeos/power/user_activity_notifier.h" |
| 69 #include "chrome/browser/chromeos/power/video_activity_notifier.h" | 69 #include "chrome/browser/chromeos/power/video_activity_notifier.h" |
| 70 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 70 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 71 #include "chrome/browser/chromeos/screensaver/screensaver_controller.h" | 71 #include "chrome/browser/chromeos/screensaver/screensaver_controller.h" |
| 72 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
" | 72 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
" |
| 73 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 73 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 74 #include "chrome/browser/chromeos/settings/owner_key_util.h" | 74 #include "chrome/browser/chromeos/settings/owner_key_util.h" |
| 75 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" | 75 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" |
| 76 #include "chrome/browser/chromeos/system/device_change_handler.h" |
| 76 #include "chrome/browser/chromeos/system/statistics_provider.h" | 77 #include "chrome/browser/chromeos/system/statistics_provider.h" |
| 77 #include "chrome/browser/chromeos/system_key_event_listener.h" | 78 #include "chrome/browser/chromeos/system_key_event_listener.h" |
| 78 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 79 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
| 79 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" | 80 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" |
| 80 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 81 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
| 81 #include "chrome/browser/defaults.h" | 82 #include "chrome/browser/defaults.h" |
| 82 #include "chrome/browser/metrics/metrics_service.h" | 83 #include "chrome/browser/metrics/metrics_service.h" |
| 83 #include "chrome/browser/net/chrome_network_delegate.h" | 84 #include "chrome/browser/net/chrome_network_delegate.h" |
| 84 #include "chrome/browser/policy/browser_policy_connector.h" | 85 #include "chrome/browser/policy/browser_policy_connector.h" |
| 85 #include "chrome/browser/profiles/profile.h" | 86 #include "chrome/browser/profiles/profile.h" |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 display_configuration_observer_.reset( | 715 display_configuration_observer_.reset( |
| 715 new DisplayConfigurationObserver()); | 716 new DisplayConfigurationObserver()); |
| 716 | 717 |
| 717 automatic_reboot_manager_.reset(new system::AutomaticRebootManager( | 718 automatic_reboot_manager_.reset(new system::AutomaticRebootManager( |
| 718 scoped_ptr<base::TickClock>(new base::DefaultTickClock))); | 719 scoped_ptr<base::TickClock>(new base::DefaultTickClock))); |
| 719 | 720 |
| 720 // This observer cannot be created earlier because it requires the shell to be | 721 // This observer cannot be created earlier because it requires the shell to be |
| 721 // available. | 722 // available. |
| 722 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); | 723 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); |
| 723 | 724 |
| 725 // Listen to changes in device hierarchy. |
| 726 device_change_handler_.reset(new system::DeviceChangeHandler()); |
| 727 |
| 724 ChromeBrowserMainPartsLinux::PostProfileInit(); | 728 ChromeBrowserMainPartsLinux::PostProfileInit(); |
| 725 } | 729 } |
| 726 | 730 |
| 727 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { | 731 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { |
| 728 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 732 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 729 // -- just before MetricsService::LogNeedForCleanShutdown(). | 733 // -- just before MetricsService::LogNeedForCleanShutdown(). |
| 730 | 734 |
| 731 g_browser_process->metrics_service()->StartExternalMetrics(); | 735 g_browser_process->metrics_service()->StartExternalMetrics(); |
| 732 | 736 |
| 733 // Listen for XI_HierarchyChanged events. Note: if this is moved to | 737 // Listen for XI_HierarchyChanged events. Note: if this is moved to |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 911 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
| 908 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 912 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
| 909 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 913 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
| 910 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 914 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
| 911 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 915 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
| 912 // This is necessary to start the experiment as a side effect. | 916 // This is necessary to start the experiment as a side effect. |
| 913 trial->group(); | 917 trial->group(); |
| 914 } | 918 } |
| 915 | 919 |
| 916 } // namespace chromeos | 920 } // namespace chromeos |
| OLD | NEW |