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/preferences_struct_traits.cc

Issue 2767743003: Pref service: Merge connectors and send a PrefRegistry in Connect(). (Closed)
Patch Set: Created 3 years, 9 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/preferences_struct_traits.h" 5 #include "services/preferences/public/cpp/preferences_struct_traits.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 using PrefStoreType = prefs::mojom::PrefStoreType; 9 using PrefStoreType = prefs::mojom::PrefStoreType;
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 case PrefStoreType::RECOMMENDED: 54 case PrefStoreType::RECOMMENDED:
55 *output = PrefValueStore::RECOMMENDED_STORE; 55 *output = PrefValueStore::RECOMMENDED_STORE;
56 return true; 56 return true;
57 case PrefStoreType::DEFAULT: 57 case PrefStoreType::DEFAULT:
58 *output = PrefValueStore::DEFAULT_STORE; 58 *output = PrefValueStore::DEFAULT_STORE;
59 return true; 59 return true;
60 } 60 }
61 return false; 61 return false;
62 } 62 }
63 63
64 using MojomReadError = prefs::mojom::PersistentPrefStoreConnector_ReadError; 64 using MojomReadError = prefs::mojom::PersistentPrefStoreConnection_ReadError;
65 65
66 MojomReadError 66 MojomReadError
67 EnumTraits<MojomReadError, PersistentPrefStore::PrefReadError>::ToMojom( 67 EnumTraits<MojomReadError, PersistentPrefStore::PrefReadError>::ToMojom(
68 PersistentPrefStore::PrefReadError input) { 68 PersistentPrefStore::PrefReadError input) {
69 switch (input) { 69 switch (input) {
70 case PersistentPrefStore::PREF_READ_ERROR_NONE: 70 case PersistentPrefStore::PREF_READ_ERROR_NONE:
71 return MojomReadError::NONE; 71 return MojomReadError::NONE;
72 case PersistentPrefStore::PREF_READ_ERROR_JSON_PARSE: 72 case PersistentPrefStore::PREF_READ_ERROR_JSON_PARSE:
73 return MojomReadError::JSON_PARSE; 73 return MojomReadError::JSON_PARSE;
74 case PersistentPrefStore::PREF_READ_ERROR_JSON_TYPE: 74 case PersistentPrefStore::PREF_READ_ERROR_JSON_TYPE:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return true; 127 return true;
128 case MojomReadError::ASYNCHRONOUS_TASK_INCOMPLETE: 128 case MojomReadError::ASYNCHRONOUS_TASK_INCOMPLETE:
129 *output = 129 *output =
130 PersistentPrefStore::PREF_READ_ERROR_ASYNCHRONOUS_TASK_INCOMPLETE; 130 PersistentPrefStore::PREF_READ_ERROR_ASYNCHRONOUS_TASK_INCOMPLETE;
131 return true; 131 return true;
132 } 132 }
133 return false; 133 return false;
134 } 134 }
135 135
136 } // namespace mojo 136 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698