| Index: chromeos/audio/audio_devices_pref_handler_impl.h
|
| diff --git a/chromeos/audio/audio_devices_pref_handler_impl.h b/chromeos/audio/audio_devices_pref_handler_impl.h
|
| index ec4f6e11766de19fc31f03025d97b86ace5781a2..eabd2250ed8fe03d2ec94b3bbbc890e5307369b3 100644
|
| --- a/chromeos/audio/audio_devices_pref_handler_impl.h
|
| +++ b/chromeos/audio/audio_devices_pref_handler_impl.h
|
| @@ -73,12 +73,29 @@ class CHROMEOS_EXPORT AudioDevicesPrefHandlerImpl
|
| double GetVolumeGainPrefValue(const AudioDevice& device);
|
| double GetDeviceDefaultOutputVolume(const AudioDevice& device);
|
|
|
| - // Methods to migrate the mute and volume settings for a device from the
|
| - // previous global pref value to the new per device pref value for the
|
| - // current active device. If a previous global setting doesn't exist, we'll
|
| - // use default values of mute = off and volume = 75%.
|
| - void MigrateDeviceMuteSettings(const std::string& active_device);
|
| - void MigrateDeviceVolumeSettings(const std::string& active_device);
|
| + // Migrates devices state pref for an audio device. Device settings are
|
| + // saved under device stable device ID - this method migrates device state
|
| + // for a device that is saved under key derived from v1 stable device ID to
|
| + // |device_key|. Note that |device_key| should be the key derived from
|
| + // |device|'s v2 stable device ID.
|
| + bool MigrateDevicesStatePref(const std::string& device_key,
|
| + const AudioDevice& device);
|
| +
|
| + // Methods to migrate the mute and volume settings for an audio device.
|
| + // Migration is done in the folowing way:
|
| + // 1. If there is a setting for the device under |device_key|, do nothing.
|
| + // (Note that |device_key| is expected to be the key derived from
|
| + // |device's| v2 stable device ID).
|
| + // 2. If there is a setting for the device under the key derived from
|
| + // |device|'s v1 stable device ID, move the value to |device_key|.
|
| + // 3. If a previous global pref value exists, move it to the per device
|
| + // setting (under |device_key|).
|
| + // 4. If a previous global setting is not set, use default values of
|
| + // mute = off and volume = 75%.
|
| + void MigrateDeviceMuteSettings(const std::string& device_key,
|
| + const AudioDevice& device);
|
| + void MigrateDeviceVolumeGainSettings(const std::string& device_key,
|
| + const AudioDevice& device);
|
|
|
| // Notifies the AudioPrefObserver for audio policy pref changes.
|
| void NotifyAudioPolicyChange();
|
|
|