| 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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 display_configuration_observer_.reset( | 733 display_configuration_observer_.reset( |
| 733 new DisplayConfigurationObserver()); | 734 new DisplayConfigurationObserver()); |
| 734 | 735 |
| 735 automatic_reboot_manager_.reset(new system::AutomaticRebootManager( | 736 automatic_reboot_manager_.reset(new system::AutomaticRebootManager( |
| 736 scoped_ptr<base::TickClock>(new base::DefaultTickClock))); | 737 scoped_ptr<base::TickClock>(new base::DefaultTickClock))); |
| 737 | 738 |
| 738 // This observer cannot be created earlier because it requires the shell to be | 739 // This observer cannot be created earlier because it requires the shell to be |
| 739 // available. | 740 // available. |
| 740 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); | 741 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); |
| 741 | 742 |
| 743 // Listen to changes in device hierarchy. |
| 744 device_change_handler_.reset(new system::DeviceChangeHandler()); |
| 745 |
| 742 ChromeBrowserMainPartsLinux::PostProfileInit(); | 746 ChromeBrowserMainPartsLinux::PostProfileInit(); |
| 743 } | 747 } |
| 744 | 748 |
| 745 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { | 749 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { |
| 746 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 750 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 747 // -- just before MetricsService::LogNeedForCleanShutdown(). | 751 // -- just before MetricsService::LogNeedForCleanShutdown(). |
| 748 | 752 |
| 749 g_browser_process->metrics_service()->StartExternalMetrics(); | 753 g_browser_process->metrics_service()->StartExternalMetrics(); |
| 750 | 754 |
| 751 // Listen for XI_HierarchyChanged events. Note: if this is moved to | 755 // Listen for XI_HierarchyChanged events. Note: if this is moved to |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 924 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
| 921 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 925 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
| 922 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 926 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
| 923 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 927 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
| 924 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 928 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
| 925 // This is necessary to start the experiment as a side effect. | 929 // This is necessary to start the experiment as a side effect. |
| 926 trial->group(); | 930 trial->group(); |
| 927 } | 931 } |
| 928 | 932 |
| 929 } // namespace chromeos | 933 } // namespace chromeos |
| OLD | NEW |