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

Side by Side Diff: chrome/browser/supervised_user/supervised_user_pref_store.cc

Issue 2704133006: Revert of Add PrefStore::GetValues (Closed)
Patch Set: Created 3 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 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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 content::Source<Profile>( 80 content::Source<Profile>(
81 supervised_user_settings_service->GetProfile())); 81 supervised_user_settings_service->GetProfile()));
82 } 82 }
83 } 83 }
84 84
85 bool SupervisedUserPrefStore::GetValue(const std::string& key, 85 bool SupervisedUserPrefStore::GetValue(const std::string& key,
86 const base::Value** value) const { 86 const base::Value** value) const {
87 return prefs_->GetValue(key, value); 87 return prefs_->GetValue(key, value);
88 } 88 }
89 89
90 std::unique_ptr<base::DictionaryValue> SupervisedUserPrefStore::GetValues()
91 const {
92 return prefs_->AsDictionaryValue();
93 }
94
95 void SupervisedUserPrefStore::AddObserver(PrefStore::Observer* observer) { 90 void SupervisedUserPrefStore::AddObserver(PrefStore::Observer* observer) {
96 observers_.AddObserver(observer); 91 observers_.AddObserver(observer);
97 } 92 }
98 93
99 void SupervisedUserPrefStore::RemoveObserver(PrefStore::Observer* observer) { 94 void SupervisedUserPrefStore::RemoveObserver(PrefStore::Observer* observer) {
100 observers_.RemoveObserver(observer); 95 observers_.RemoveObserver(observer);
101 } 96 }
102 97
103 bool SupervisedUserPrefStore::HasObservers() const { 98 bool SupervisedUserPrefStore::HasObservers() const {
104 return observers_.might_have_observers(); 99 return observers_.might_have_observers();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 184 }
190 185
191 // Callback to unsubscribe from the supervised user settings service. 186 // Callback to unsubscribe from the supervised user settings service.
192 void SupervisedUserPrefStore::Observe( 187 void SupervisedUserPrefStore::Observe(
193 int type, 188 int type,
194 const content::NotificationSource& src, 189 const content::NotificationSource& src,
195 const content::NotificationDetails& details) { 190 const content::NotificationDetails& details) {
196 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type); 191 DCHECK_EQ(chrome::NOTIFICATION_PROFILE_DESTROYED, type);
197 user_settings_subscription_.reset(); 192 user_settings_subscription_.reset();
198 } 193 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698