| Index: chrome/browser/ui/views/ash/volume_controller_chromeos.cc
|
| diff --git a/chrome/browser/ui/views/ash/volume_controller_chromeos.cc b/chrome/browser/ui/views/ash/volume_controller_chromeos.cc
|
| index 1db47d8ca262c64319db171515b8a1a0d6e7b241..c424cf483176ee5751945ae8eced0b502235e4d1 100644
|
| --- a/chrome/browser/ui/views/ash/volume_controller_chromeos.cc
|
| +++ b/chrome/browser/ui/views/ash/volume_controller_chromeos.cc
|
| @@ -14,11 +14,6 @@ namespace {
|
| // Percent by which the volume should be changed when a volume key is pressed.
|
| const double kStepPercentage = 4.0;
|
|
|
| -// Percent to which the volume should be set when the "volume up" key is pressed
|
| -// while we're muted and have the volume set to 0. See
|
| -// http://crosbug.com/13618.
|
| -const double kVolumePercentOnVolumeUpWhileMuted = 25.0;
|
| -
|
| } // namespace
|
|
|
| bool VolumeController::HandleVolumeMute(const ui::Accelerator& accelerator) {
|
| @@ -58,8 +53,11 @@ bool VolumeController::HandleVolumeUp(const ui::Accelerator& accelerator) {
|
| chromeos::AudioHandler* audio_handler = chromeos::AudioHandler::GetInstance();
|
| if (audio_handler->IsMuted()) {
|
| audio_handler->SetMuted(false);
|
| - if (audio_handler->GetVolumePercent() <= 0.1) // float comparison
|
| - audio_handler->SetVolumePercent(kVolumePercentOnVolumeUpWhileMuted);
|
| + // If volume percent is still 0.0 after reset the mute status, it means that
|
| + // the mute status was done by VolumeDown, so we need to increase
|
| + // the volume as usual.
|
| + if (audio_handler->GetVolumePercent() == 0.0)
|
| + audio_handler->AdjustVolumeByPercent(kStepPercentage);
|
| } else {
|
| audio_handler->AdjustVolumeByPercent(kStepPercentage);
|
| }
|
|
|