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

Side by Side Diff: mojo/common/values_struct_traits.h

Issue 2812863002: Pref service: Add a ScopedDictionaryPrefUpdate to track value changes. (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « components/prefs/writeable_pref_store.cc ('k') | mojo/common/values_struct_traits.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 MOJO_COMMON_VALUES_STRUCT_TRAITS_H_ 5 #ifndef MOJO_COMMON_VALUES_STRUCT_TRAITS_H_
6 #define MOJO_COMMON_VALUES_STRUCT_TRAITS_H_ 6 #define MOJO_COMMON_VALUES_STRUCT_TRAITS_H_
7 7
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "mojo/common/values.mojom.h" 9 #include "mojo/common/values.mojom.h"
10 #include "mojo/public/cpp/bindings/array_traits.h" 10 #include "mojo/public/cpp/bindings/array_traits.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 static const base::DictionaryValue& dictionary_value( 245 static const base::DictionaryValue& dictionary_value(
246 const std::unique_ptr<base::Value>& value) { 246 const std::unique_ptr<base::Value>& value) {
247 return UnionTraits<common::mojom::ValueDataView, 247 return UnionTraits<common::mojom::ValueDataView,
248 base::Value>::dictionary_value(*value); 248 base::Value>::dictionary_value(*value);
249 } 249 }
250 250
251 static bool Read(common::mojom::ValueDataView data, 251 static bool Read(common::mojom::ValueDataView data,
252 std::unique_ptr<base::Value>* value); 252 std::unique_ptr<base::Value>* value);
253 }; 253 };
254 254
255 template <>
256 struct CloneTraits<std::unique_ptr<base::Value>, false> {
257 static std::unique_ptr<base::Value> Clone(
258 const std::unique_ptr<base::Value>& input);
259 };
260
255 } // namespace mojo 261 } // namespace mojo
256 262
257 #endif // MOJO_COMMON_VALUES_STRUCT_TRAITS_H_ 263 #endif // MOJO_COMMON_VALUES_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « components/prefs/writeable_pref_store.cc ('k') | mojo/common/values_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698