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

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

Issue 2555853003: Break up common_custom_types.mojom. (Closed)
Patch Set: 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 #include "services/preferences/public/cpp/pref_observer_store.h" 5 #include "services/preferences/public/cpp/pref_observer_store.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "mojo/common/common_custom_types.mojom.h"
9 #include "mojo/public/cpp/bindings/array.h" 8 #include "mojo/public/cpp/bindings/array.h"
10 #include "services/service_manager/public/cpp/connector.h" 9 #include "services/service_manager/public/cpp/connector.h"
11 10
12 PrefObserverStore::PrefObserverStore( 11 PrefObserverStore::PrefObserverStore(
13 prefs::mojom::PreferencesManagerPtr prefs_manager_ptr) 12 prefs::mojom::PreferencesManagerPtr prefs_manager_ptr)
14 : prefs_binding_(this), 13 : prefs_binding_(this),
15 prefs_manager_ptr_(std::move(prefs_manager_ptr)), 14 prefs_manager_ptr_(std::move(prefs_manager_ptr)),
16 initialized_(false) {} 15 initialized_(false) {}
17 16
18 void PrefObserverStore::Init(const std::set<std::string>& keys) { 17 void PrefObserverStore::Init(const std::set<std::string>& keys) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 continue; 91 continue;
93 // We deliberately call the parent to avoid notifying the server again. 92 // We deliberately call the parent to avoid notifying the server again.
94 ValueMapPrefStore::SetValue(it.key(), it.value().CreateDeepCopy(), 0); 93 ValueMapPrefStore::SetValue(it.key(), it.value().CreateDeepCopy(), 0);
95 } 94 }
96 95
97 if (!initialized_) { 96 if (!initialized_) {
98 initialized_ = true; 97 initialized_ = true;
99 NotifyInitializationCompleted(); 98 NotifyInitializationCompleted();
100 } 99 }
101 } 100 }
OLDNEW
« no previous file with comments | « services/preferences/public/cpp/pref_observer_store.h ('k') | services/preferences/public/interfaces/preferences.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698