Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 14801002: Switch Audio Preferences to per device. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "chrome/browser/profiles/profile.h" 84 #include "chrome/browser/profiles/profile.h"
85 #include "chrome/browser/profiles/profile_manager.h" 85 #include "chrome/browser/profiles/profile_manager.h"
86 #include "chrome/browser/rlz/rlz.h" 86 #include "chrome/browser/rlz/rlz.h"
87 #include "chrome/browser/storage_monitor/storage_monitor_chromeos.h" 87 #include "chrome/browser/storage_monitor/storage_monitor_chromeos.h"
88 #include "chrome/common/chrome_notification_types.h" 88 #include "chrome/common/chrome_notification_types.h"
89 #include "chrome/common/chrome_paths.h" 89 #include "chrome/common/chrome_paths.h"
90 #include "chrome/common/chrome_switches.h" 90 #include "chrome/common/chrome_switches.h"
91 #include "chrome/common/chrome_version_info.h" 91 #include "chrome/common/chrome_version_info.h"
92 #include "chrome/common/logging_chrome.h" 92 #include "chrome/common/logging_chrome.h"
93 #include "chrome/common/pref_names.h" 93 #include "chrome/common/pref_names.h"
94 #include "chromeos/audio/audio_devices_pref_handler.h"
94 #include "chromeos/audio/audio_pref_handler.h" 95 #include "chromeos/audio/audio_pref_handler.h"
95 #include "chromeos/audio/cras_audio_handler.h" 96 #include "chromeos/audio/cras_audio_handler.h"
96 #include "chromeos/audio/cras_audio_switch_handler.h" 97 #include "chromeos/audio/cras_audio_switch_handler.h"
97 #include "chromeos/chromeos_switches.h" 98 #include "chromeos/chromeos_switches.h"
98 #include "chromeos/cryptohome/async_method_caller.h" 99 #include "chromeos/cryptohome/async_method_caller.h"
99 #include "chromeos/cryptohome/cryptohome_library.h" 100 #include "chromeos/cryptohome/cryptohome_library.h"
100 #include "chromeos/dbus/dbus_thread_manager.h" 101 #include "chromeos/dbus/dbus_thread_manager.h"
101 #include "chromeos/dbus/power_manager_client.h" 102 #include "chromeos/dbus/power_manager_client.h"
102 #include "chromeos/dbus/session_manager_client.h" 103 #include "chromeos/dbus/session_manager_client.h"
103 #include "chromeos/disks/disk_mount_manager.h" 104 #include "chromeos/disks/disk_mount_manager.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. 479 // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun.
479 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. 480 // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads.
480 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { 481 void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() {
481 // TODO(rkc): Once the CrasAudioHandler is initialized by default, move 482 // TODO(rkc): Once the CrasAudioHandler is initialized by default, move
482 // the code from CrasAudioSwitchHandler into it and remove this line. 483 // the code from CrasAudioSwitchHandler into it and remove this line.
483 if (CommandLine::ForCurrentProcess()->HasSwitch( 484 if (CommandLine::ForCurrentProcess()->HasSwitch(
484 chromeos::switches::kEnableChromeAudioSwitching)) 485 chromeos::switches::kEnableChromeAudioSwitching))
485 CrasAudioSwitchHandler::Initialize(); 486 CrasAudioSwitchHandler::Initialize();
486 if (UseNewAudioHandler()) { 487 if (UseNewAudioHandler()) {
487 CrasAudioHandler::Initialize( 488 CrasAudioHandler::Initialize(
488 AudioPrefHandler::Create(g_browser_process->local_state())); 489 AudioDevicesPrefHandler::Create(g_browser_process->local_state()));
489 } else { 490 } else {
490 AudioHandler::Initialize( 491 AudioHandler::Initialize(
491 AudioPrefHandler::Create(g_browser_process->local_state())); 492 AudioPrefHandler::Create(g_browser_process->local_state()));
492 } 493 }
493 494
494 if (!StartupUtils::IsOobeCompleted()) 495 if (!StartupUtils::IsOobeCompleted())
495 system::StatisticsProvider::GetInstance()->LoadOemManifest(); 496 system::StatisticsProvider::GetInstance()->LoadOemManifest();
496 497
497 base::FilePath downloads_directory; 498 base::FilePath downloads_directory;
498 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); 499 CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory));
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); 892 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0);
892 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); 893 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0);
893 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); 894 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0);
894 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); 895 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0);
895 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); 896 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0);
896 // This is necessary to start the experiment as a side effect. 897 // This is necessary to start the experiment as a side effect.
897 trial->group(); 898 trial->group();
898 } 899 }
899 900
900 } // namespace chromeos 901 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698