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

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

Issue 1662523004: Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 #include "chromeos/audio/audio_devices_pref_handler_impl.h" 5 #include "chromeos/audio/audio_devices_pref_handler_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/prefs/pref_registry_simple.h"
15 #include "base/prefs/pref_service.h"
16 #include "base/prefs/scoped_user_pref_update.h"
17 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
18 #include "chromeos/audio/audio_device.h" 15 #include "chromeos/audio/audio_device.h"
19 #include "chromeos/chromeos_pref_names.h" 16 #include "chromeos/chromeos_pref_names.h"
17 #include "components/prefs/pref_registry_simple.h"
18 #include "components/prefs/pref_service.h"
19 #include "components/prefs/scoped_user_pref_update.h"
20 20
21 namespace { 21 namespace {
22 22
23 // Values used for muted preference. 23 // Values used for muted preference.
24 const int kPrefMuteOff = 0; 24 const int kPrefMuteOff = 0;
25 const int kPrefMuteOn = 1; 25 const int kPrefMuteOn = 1;
26 26
27 // Gets the device id string for storing audio preference. The format of 27 // Gets the device id string for storing audio preference. The format of
28 // device string is a string consisting of 2 parts. 28 // device string is a string consisting of 2 parts.
29 // |integer from lower 32 bit of device id| : 29 // |integer from lower 32 bit of device id| :
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // media system. 237 // media system.
238 registry->RegisterBooleanPref(prefs::kAudioOutputAllowed, true); 238 registry->RegisterBooleanPref(prefs::kAudioOutputAllowed, true);
239 239
240 // Register the legacy audio prefs for migration. 240 // Register the legacy audio prefs for migration.
241 registry->RegisterDoublePref(prefs::kAudioVolumePercent, 241 registry->RegisterDoublePref(prefs::kAudioVolumePercent,
242 kDefaultOutputVolumePercent); 242 kDefaultOutputVolumePercent);
243 registry->RegisterIntegerPref(prefs::kAudioMute, kPrefMuteOff); 243 registry->RegisterIntegerPref(prefs::kAudioMute, kPrefMuteOff);
244 } 244 }
245 245
246 } // namespace chromeos 246 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/audio/audio_devices_pref_handler_impl.h ('k') | chromeos/audio/audio_devices_pref_handler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698