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

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

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: rebase Created 3 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/preferences.h" 5 #include "chrome/browser/chromeos/preferences.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/autoclick/autoclick_controller.h" 9 #include "ash/autoclick/autoclick_controller.h"
10 #include "ash/common/accessibility_types.h" 10 #include "ash/common/accessibility_types.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 prefs::kLanguageXkbAutoRepeatDelay, prefs, callback); 406 prefs::kLanguageXkbAutoRepeatDelay, prefs, callback);
407 xkb_auto_repeat_interval_pref_.Init( 407 xkb_auto_repeat_interval_pref_.Init(
408 prefs::kLanguageXkbAutoRepeatInterval, prefs, callback); 408 prefs::kLanguageXkbAutoRepeatInterval, prefs, callback);
409 409
410 wake_on_wifi_darkconnect_.Init(prefs::kWakeOnWifiDarkConnect, prefs, 410 wake_on_wifi_darkconnect_.Init(prefs::kWakeOnWifiDarkConnect, prefs,
411 callback); 411 callback);
412 412
413 pref_change_registrar_.Init(prefs); 413 pref_change_registrar_.Init(prefs);
414 pref_change_registrar_.Add(prefs::kResolveTimezoneByGeolocation, callback); 414 pref_change_registrar_.Add(prefs::kResolveTimezoneByGeolocation, callback);
415 pref_change_registrar_.Add(prefs::kUse24HourClock, callback); 415 pref_change_registrar_.Add(prefs::kUse24HourClock, callback);
416 for (auto remap_pref : kLanguageRemapPrefs) 416 for (auto* remap_pref : kLanguageRemapPrefs)
417 pref_change_registrar_.Add(remap_pref, callback); 417 pref_change_registrar_.Add(remap_pref, callback);
418 } 418 }
419 419
420 void Preferences::Init(Profile* profile, const user_manager::User* user) { 420 void Preferences::Init(Profile* profile, const user_manager::User* user) {
421 DCHECK(profile); 421 DCHECK(profile);
422 DCHECK(user); 422 DCHECK(user);
423 sync_preferences::PrefServiceSyncable* prefs = 423 sync_preferences::PrefServiceSyncable* prefs =
424 PrefServiceSyncableFromProfile(profile); 424 PrefServiceSyncableFromProfile(profile);
425 // This causes OnIsSyncingChanged to be called when the value of 425 // This causes OnIsSyncingChanged to be called when the value of
426 // PrefService::IsSyncing() changes. 426 // PrefService::IsSyncing() changes.
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 } 723 }
724 } 724 }
725 725
726 if (pref_name == prefs::kUse24HourClock || 726 if (pref_name == prefs::kUse24HourClock ||
727 reason != REASON_ACTIVE_USER_CHANGED) { 727 reason != REASON_ACTIVE_USER_CHANGED) {
728 const bool value = prefs_->GetBoolean(prefs::kUse24HourClock); 728 const bool value = prefs_->GetBoolean(prefs::kUse24HourClock);
729 user_manager::known_user::SetBooleanPref(user_->GetAccountId(), 729 user_manager::known_user::SetBooleanPref(user_->GetAccountId(),
730 prefs::kUse24HourClock, value); 730 prefs::kUse24HourClock, value);
731 } 731 }
732 732
733 for (auto remap_pref : kLanguageRemapPrefs) { 733 for (auto* remap_pref : kLanguageRemapPrefs) {
734 if (pref_name == remap_pref || reason != REASON_ACTIVE_USER_CHANGED) { 734 if (pref_name == remap_pref || reason != REASON_ACTIVE_USER_CHANGED) {
735 const int value = prefs_->GetInteger(remap_pref); 735 const int value = prefs_->GetInteger(remap_pref);
736 user_manager::known_user::SetIntegerPref(user_->GetAccountId(), 736 user_manager::known_user::SetIntegerPref(user_->GetAccountId(),
737 remap_pref, value); 737 remap_pref, value);
738 } 738 }
739 } 739 }
740 740
741 system::InputDeviceSettings::Get()->UpdateTouchDevicesStatusFromPrefs(); 741 system::InputDeviceSettings::Get()->UpdateTouchDevicesStatusFromPrefs();
742 } 742 }
743 743
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 touch_hud_projection_enabled_.SetValue(enabled); 832 touch_hud_projection_enabled_.SetValue(enabled);
833 } 833 }
834 834
835 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { 835 void Preferences::ActiveUserChanged(const user_manager::User* active_user) {
836 if (active_user != user_) 836 if (active_user != user_)
837 return; 837 return;
838 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); 838 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, "");
839 } 839 }
840 840
841 } // namespace chromeos 841 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698