OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/supervised_user/supervised_user_pref_store.h" | 5 #include "chrome/browser/supervised_user/supervised_user_pref_store.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/prefs/pref_value_map.h" | 10 #include "base/prefs/pref_value_map.h" |
(...skipping 26 matching lines...) Expand all Loading... | |
37 supervised_users::kContentPackManualBehaviorURLs, | 37 supervised_users::kContentPackManualBehaviorURLs, |
38 prefs::kSupervisedUserManualURLs, | 38 prefs::kSupervisedUserManualURLs, |
39 }, | 39 }, |
40 { | 40 { |
41 supervised_users::kForceSafeSearch, prefs::kForceSafeSearch, | 41 supervised_users::kForceSafeSearch, prefs::kForceSafeSearch, |
42 }, | 42 }, |
43 { | 43 { |
44 supervised_users::kRecordHistory, prefs::kRecordHistory, | 44 supervised_users::kRecordHistory, prefs::kRecordHistory, |
45 }, | 45 }, |
46 { | 46 { |
47 supervised_users::kAllowDeletingBrowserHistory, | |
Bernhard Bauer
2014/11/07 11:06:18
It might make sense to also keep these alphabetize
Marc Treib
2014/11/07 13:23:01
Done.
| |
48 prefs::kAllowDeletingBrowserHistory, | |
49 }, | |
50 { | |
51 supervised_users::kIncognitoModeAvailability, | |
52 prefs::kIncognitoModeAvailability, | |
53 }, | |
54 { | |
47 supervised_users::kSigninAllowed, prefs::kSigninAllowed, | 55 supervised_users::kSigninAllowed, prefs::kSigninAllowed, |
48 }, | 56 }, |
49 { | 57 { |
50 supervised_users::kUserName, prefs::kProfileName, | 58 supervised_users::kUserName, prefs::kProfileName, |
51 }, | 59 }, |
52 }; | 60 }; |
53 | 61 |
54 } // namespace | 62 } // namespace |
55 | 63 |
56 SupervisedUserPrefStore::SupervisedUserPrefStore( | 64 SupervisedUserPrefStore::SupervisedUserPrefStore( |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 } | 127 } |
120 | 128 |
121 std::vector<std::string> changed_prefs; | 129 std::vector<std::string> changed_prefs; |
122 prefs_->GetDifferingKeys(old_prefs.get(), &changed_prefs); | 130 prefs_->GetDifferingKeys(old_prefs.get(), &changed_prefs); |
123 | 131 |
124 // Send out change notifications. | 132 // Send out change notifications. |
125 for (const std::string& pref : changed_prefs) { | 133 for (const std::string& pref : changed_prefs) { |
126 FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(pref)); | 134 FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(pref)); |
127 } | 135 } |
128 } | 136 } |
OLD | NEW |