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

Side by Side Diff: chromeos/audio/audio_devices_pref_handler_impl.h

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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
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 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_ 5 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
6 #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_ 6 #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void UpdateDevicesVolumePref(); 57 void UpdateDevicesVolumePref();
58 void SaveDevicesVolumePref(); 58 void SaveDevicesVolumePref();
59 59
60 double GetVolumeGainPrefValue(const AudioDevice& device); 60 double GetVolumeGainPrefValue(const AudioDevice& device);
61 double GetDeviceDefaultOutputVolume(const AudioDevice& device); 61 double GetDeviceDefaultOutputVolume(const AudioDevice& device);
62 62
63 // Methods to migrate the mute and volume settings for a device from the 63 // Methods to migrate the mute and volume settings for a device from the
64 // previous global pref value to the new per device pref value for the 64 // previous global pref value to the new per device pref value for the
65 // current active device. If a previous global setting doesn't exist, we'll 65 // current active device. If a previous global setting doesn't exist, we'll
66 // use default values of mute = off and volume = 75%. 66 // use default values of mute = off and volume = 75%.
67 void MigrateDeviceMuteSettings(std::string active_device); 67 void MigrateDeviceMuteSettings(const std::string& active_device);
68 void MigrateDeviceVolumeSettings(std::string active_device); 68 void MigrateDeviceVolumeSettings(const std::string& active_device);
69 69
70 // Notifies the AudioPrefObserver for audio policy pref changes. 70 // Notifies the AudioPrefObserver for audio policy pref changes.
71 void NotifyAudioPolicyChange(); 71 void NotifyAudioPolicyChange();
72 72
73 scoped_ptr<base::DictionaryValue> device_mute_settings_; 73 scoped_ptr<base::DictionaryValue> device_mute_settings_;
74 scoped_ptr<base::DictionaryValue> device_volume_settings_; 74 scoped_ptr<base::DictionaryValue> device_volume_settings_;
75 75
76 PrefService* local_state_; // not owned 76 PrefService* local_state_; // not owned
77 77
78 PrefChangeRegistrar pref_change_registrar_; 78 PrefChangeRegistrar pref_change_registrar_;
79 base::ObserverList<AudioPrefObserver> observers_; 79 base::ObserverList<AudioPrefObserver> observers_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerImpl); 81 DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerImpl);
82 }; 82 };
83 83
84 } // namespace chromeos 84 } // namespace chromeos
85 85
86 #endif // CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_ 86 #endif // CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698