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/shell.h" | 10 #include "ash/shell.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 #include "chrome/browser/profiles/profile.h" | 80 #include "chrome/browser/profiles/profile.h" |
81 #include "chrome/browser/profiles/profile_manager.h" | 81 #include "chrome/browser/profiles/profile_manager.h" |
82 #include "chrome/browser/rlz/rlz.h" | 82 #include "chrome/browser/rlz/rlz.h" |
83 #include "chrome/browser/storage_monitor/storage_monitor_chromeos.h" | 83 #include "chrome/browser/storage_monitor/storage_monitor_chromeos.h" |
84 #include "chrome/common/chrome_notification_types.h" | 84 #include "chrome/common/chrome_notification_types.h" |
85 #include "chrome/common/chrome_paths.h" | 85 #include "chrome/common/chrome_paths.h" |
86 #include "chrome/common/chrome_switches.h" | 86 #include "chrome/common/chrome_switches.h" |
87 #include "chrome/common/chrome_version_info.h" | 87 #include "chrome/common/chrome_version_info.h" |
88 #include "chrome/common/logging_chrome.h" | 88 #include "chrome/common/logging_chrome.h" |
89 #include "chrome/common/pref_names.h" | 89 #include "chrome/common/pref_names.h" |
| 90 #include "chromeos/audio/audio_pref_handler.h" |
90 #include "chromeos/chromeos_switches.h" | 91 #include "chromeos/chromeos_switches.h" |
91 #include "chromeos/cryptohome/async_method_caller.h" | 92 #include "chromeos/cryptohome/async_method_caller.h" |
92 #include "chromeos/dbus/dbus_thread_manager.h" | 93 #include "chromeos/dbus/dbus_thread_manager.h" |
93 #include "chromeos/dbus/power_manager_client.h" | 94 #include "chromeos/dbus/power_manager_client.h" |
94 #include "chromeos/dbus/session_manager_client.h" | 95 #include "chromeos/dbus/session_manager_client.h" |
95 #include "chromeos/disks/disk_mount_manager.h" | 96 #include "chromeos/disks/disk_mount_manager.h" |
96 #include "chromeos/ime/xkeyboard.h" | 97 #include "chromeos/ime/xkeyboard.h" |
97 #include "chromeos/network/geolocation_handler.h" | 98 #include "chromeos/network/geolocation_handler.h" |
98 #include "chromeos/network/managed_network_configuration_handler.h" | 99 #include "chromeos/network/managed_network_configuration_handler.h" |
99 #include "chromeos/network/network_change_notifier_chromeos.h" | 100 #include "chromeos/network/network_change_notifier_chromeos.h" |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 message_loop->AddObserver(g_message_loop_observer.Pointer()); | 448 message_loop->AddObserver(g_message_loop_observer.Pointer()); |
448 | 449 |
449 dbus_services_.reset(new internal::DBusServices(parameters())); | 450 dbus_services_.reset(new internal::DBusServices(parameters())); |
450 | 451 |
451 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); | 452 ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); |
452 } | 453 } |
453 | 454 |
454 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. | 455 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. |
455 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. | 456 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. |
456 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { | 457 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { |
457 AudioHandler::Initialize(); | 458 AudioHandler::Initialize( |
| 459 AudioPrefHandler::Create(g_browser_process->local_state())); |
458 | 460 |
459 base::FilePath downloads_directory; | 461 base::FilePath downloads_directory; |
460 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); | 462 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); |
461 imageburner::BurnManager::Initialize( | 463 imageburner::BurnManager::Initialize( |
462 downloads_directory, g_browser_process->system_request_context()); | 464 downloads_directory, g_browser_process->system_request_context()); |
463 | 465 |
464 // Listen for system key events so that the user will be able to adjust the | 466 // Listen for system key events so that the user will be able to adjust the |
465 // volume on the login screen, if Chrome is running on Chrome OS | 467 // volume on the login screen, if Chrome is running on Chrome OS |
466 // (i.e. not Linux desktop), and in non-test mode. | 468 // (i.e. not Linux desktop), and in non-test mode. |
467 // Note: SystemKeyEventListener depends on the DBus thread. | 469 // Note: SystemKeyEventListener depends on the DBus thread. |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 837 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
836 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 838 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
837 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 839 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
838 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 840 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
839 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 841 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
840 // This is necessary to start the experiment as a side effect. | 842 // This is necessary to start the experiment as a side effect. |
841 trial->group(); | 843 trial->group(); |
842 } | 844 } |
843 | 845 |
844 } // namespace chromeos | 846 } // namespace chromeos |
OLD | NEW |