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

Side by Side Diff: services/preferences/public/cpp/pref_observer_store.h

Issue 2577563002: Add struct traits for base::Value. (Closed)
Patch Set: rebase Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef SERVICES_PREFERENCES_PUBLIC_CPP_PREFS_OBSERVER_STORE_H_ 5 #ifndef SERVICES_PREFERENCES_PUBLIC_CPP_PREFS_OBSERVER_STORE_H_
6 #define SERVICES_PREFERENCES_PUBLIC_CPP_PREFS_OBSERVER_STORE_H_ 6 #define SERVICES_PREFERENCES_PUBLIC_CPP_PREFS_OBSERVER_STORE_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ~PrefObserverStore() override; 54 ~PrefObserverStore() override;
55 55
56 private: 56 private:
57 friend class PrefObserverStoreTest; 57 friend class PrefObserverStoreTest;
58 58
59 // Notifies |prefs_manager_| of the change in |key| - |value| pair. 59 // Notifies |prefs_manager_| of the change in |key| - |value| pair.
60 void SetValueOnPreferenceManager(const std::string& key, 60 void SetValueOnPreferenceManager(const std::string& key,
61 base::Value const & value); 61 base::Value const & value);
62 62
63 // prefs::mojom::PreferenceObserver: 63 // prefs::mojom::PreferenceObserver:
64 void OnPreferencesChanged(const base::DictionaryValue& preferences) override; 64 void OnPreferencesChanged(
65 std::unique_ptr<base::DictionaryValue> preferences) override;
65 66
66 mojo::Binding<prefs::mojom::PreferencesObserver> prefs_binding_; 67 mojo::Binding<prefs::mojom::PreferencesObserver> prefs_binding_;
67 prefs::mojom::PreferencesManagerPtr prefs_manager_ptr_; 68 prefs::mojom::PreferencesManagerPtr prefs_manager_ptr_;
68 69
69 std::set<std::string> keys_; 70 std::set<std::string> keys_;
70 71
71 // True upon the first OnPreferencesChanged received after Init. 72 // True upon the first OnPreferencesChanged received after Init.
72 bool initialized_; 73 bool initialized_;
73 74
74 DISALLOW_COPY_AND_ASSIGN(PrefObserverStore); 75 DISALLOW_COPY_AND_ASSIGN(PrefObserverStore);
75 }; 76 };
76 77
77 #endif // SERVICES_PREFERENCES_PUBLIC_CPP_PREFS_OBSERVER_STORE_H_ 78 #endif // SERVICES_PREFERENCES_PUBLIC_CPP_PREFS_OBSERVER_STORE_H_
OLDNEW
« no previous file with comments | « mojo/common/values_struct_traits.cc ('k') | services/preferences/public/cpp/pref_observer_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698