| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 #include "chrome/browser/ui/gtk/gtk_util.h" | 124 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 125 #endif | 125 #endif |
| 126 | 126 |
| 127 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 127 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 128 #include "chrome/browser/first_run/upgrade_util_linux.h" | 128 #include "chrome/browser/first_run/upgrade_util_linux.h" |
| 129 #endif | 129 #endif |
| 130 | 130 |
| 131 #if defined(OS_CHROMEOS) | 131 #if defined(OS_CHROMEOS) |
| 132 #include "chrome/browser/chromeos/audio_handler.h" | 132 #include "chrome/browser/chromeos/audio_handler.h" |
| 133 #include "chrome/browser/chromeos/boot_times_loader.h" | 133 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 134 #include "chrome/browser/chromeos/brightness_observer.h" | |
| 135 #include "chrome/browser/chromeos/cros_settings_names.h" | 134 #include "chrome/browser/chromeos/cros_settings_names.h" |
| 136 #include "chrome/browser/chromeos/cros/cros_library.h" | 135 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 137 #include "chrome/browser/chromeos/cros/screen_lock_library.h" | 136 #include "chrome/browser/chromeos/cros/screen_lock_library.h" |
| 138 #include "chrome/browser/chromeos/customization_document.h" | 137 #include "chrome/browser/chromeos/customization_document.h" |
| 139 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 138 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 140 #include "chrome/browser/chromeos/external_metrics.h" | 139 #include "chrome/browser/chromeos/external_metrics.h" |
| 141 #include "chrome/browser/chromeos/login/authenticator.h" | 140 #include "chrome/browser/chromeos/login/authenticator.h" |
| 142 #include "chrome/browser/chromeos/login/login_utils.h" | 141 #include "chrome/browser/chromeos/login/login_utils.h" |
| 143 #include "chrome/browser/chromeos/login/ownership_service.h" | 142 #include "chrome/browser/chromeos/login/ownership_service.h" |
| 144 #include "chrome/browser/chromeos/login/screen_locker.h" | 143 #include "chrome/browser/chromeos/login/screen_locker.h" |
| (...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1807 #if defined(OS_WIN) | 1806 #if defined(OS_WIN) |
| 1808 fragmentation_checker::RecordFragmentationMetricForCurrentModule(); | 1807 fragmentation_checker::RecordFragmentationMetricForCurrentModule(); |
| 1809 #endif | 1808 #endif |
| 1810 | 1809 |
| 1811 #if defined(OS_CHROMEOS) | 1810 #if defined(OS_CHROMEOS) |
| 1812 metrics->StartExternalMetrics(); | 1811 metrics->StartExternalMetrics(); |
| 1813 | 1812 |
| 1814 // Initialize the audio handler on ChromeOS. | 1813 // Initialize the audio handler on ChromeOS. |
| 1815 chromeos::AudioHandler::Initialize(); | 1814 chromeos::AudioHandler::Initialize(); |
| 1816 | 1815 |
| 1817 // Initialize the brightness observer so that we'll display an onscreen | |
| 1818 // indication of brightness changes during login. | |
| 1819 static chromeos::BrightnessObserver* brightness_observer = | |
| 1820 new chromeos::BrightnessObserver(); | |
| 1821 chromeos::DBusThreadManager::Get()->power_manager_client()->AddObserver( | |
| 1822 brightness_observer); | |
| 1823 | |
| 1824 // Listen for system key events so that the user will be able to adjust the | 1816 // Listen for system key events so that the user will be able to adjust the |
| 1825 // volume on the login screen. | 1817 // volume on the login screen. |
| 1826 chromeos::SystemKeyEventListener::Initialize(); | 1818 chromeos::SystemKeyEventListener::Initialize(); |
| 1827 | 1819 |
| 1828 // Listen for XI_HierarchyChanged events. | 1820 // Listen for XI_HierarchyChanged events. |
| 1829 chromeos::XInputHierarchyChangedEventListener::GetInstance(); | 1821 chromeos::XInputHierarchyChangedEventListener::GetInstance(); |
| 1830 #endif | 1822 #endif |
| 1831 | 1823 |
| 1832 // The extension service may be available at this point. If the command line | 1824 // The extension service may be available at this point. If the command line |
| 1833 // specifies --uninstall-extension, attempt the uninstall extension startup | 1825 // specifies --uninstall-extension, attempt the uninstall extension startup |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2101 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2093 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2102 (pre_read == "0" || pre_read == "1")) { | 2094 (pre_read == "0" || pre_read == "1")) { |
| 2103 std::string uma_name(name); | 2095 std::string uma_name(name); |
| 2104 uma_name += "_PreRead"; | 2096 uma_name += "_PreRead"; |
| 2105 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2097 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2106 AddPreReadHistogramTime(uma_name.c_str(), time); | 2098 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2107 } | 2099 } |
| 2108 #endif | 2100 #endif |
| 2109 #endif | 2101 #endif |
| 2110 } | 2102 } |
| OLD | NEW |