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

Side by Side Diff: components/sync/base/model_type.h

Issue 2889163002: Remove raw DictionaryValue::Set in //components (Closed)
Patch Set: Nits Created 3 years, 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ 5 #ifndef COMPONENTS_SYNC_BASE_MODEL_TYPE_H_
6 #define COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ 6 #define COMPONENTS_SYNC_BASE_MODEL_TYPE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <ostream> 10 #include <ostream>
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // Returns a pointer to a string with application lifetime that represents 278 // Returns a pointer to a string with application lifetime that represents
279 // the name of |model_type|. 279 // the name of |model_type|.
280 const char* ModelTypeToString(ModelType model_type); 280 const char* ModelTypeToString(ModelType model_type);
281 281
282 // Some histograms take an integer parameter that represents a model type. 282 // Some histograms take an integer parameter that represents a model type.
283 // The mapping from ModelType to integer is defined here. It should match 283 // The mapping from ModelType to integer is defined here. It should match
284 // the mapping from integer to labels defined in histograms.xml. 284 // the mapping from integer to labels defined in histograms.xml.
285 int ModelTypeToHistogramInt(ModelType model_type); 285 int ModelTypeToHistogramInt(ModelType model_type);
286 286
287 // Handles all model types, and not just real ones. 287 // Handles all model types, and not just real ones.
288 // 288 std::unique_ptr<base::Value> ModelTypeToValue(ModelType model_type);
289 // Caller takes ownership of returned value.
290 base::Value* ModelTypeToValue(ModelType model_type);
291 289
292 // Converts a Value into a ModelType - complement to ModelTypeToValue(). 290 // Converts a Value into a ModelType - complement to ModelTypeToValue().
293 ModelType ModelTypeFromValue(const base::Value& value); 291 ModelType ModelTypeFromValue(const base::Value& value);
294 292
295 // Returns the ModelType corresponding to the name |model_type_string|. 293 // Returns the ModelType corresponding to the name |model_type_string|.
296 ModelType ModelTypeFromString(const std::string& model_type_string); 294 ModelType ModelTypeFromString(const std::string& model_type_string);
297 295
298 // Returns the comma-separated string representation of |model_types|. 296 // Returns the comma-separated string representation of |model_types|.
299 std::string ModelTypeSetToString(ModelTypeSet model_types); 297 std::string ModelTypeSetToString(ModelTypeSet model_types);
300 298
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 349
352 // Returns true if |model_type| supports parent-child hierarchy or entries. 350 // Returns true if |model_type| supports parent-child hierarchy or entries.
353 bool TypeSupportsHierarchy(ModelType model_type); 351 bool TypeSupportsHierarchy(ModelType model_type);
354 352
355 // Returns true if |model_type| supports ordering of sibling entries. 353 // Returns true if |model_type| supports ordering of sibling entries.
356 bool TypeSupportsOrdering(ModelType model_type); 354 bool TypeSupportsOrdering(ModelType model_type);
357 355
358 } // namespace syncer 356 } // namespace syncer
359 357
360 #endif // COMPONENTS_SYNC_BASE_MODEL_TYPE_H_ 358 #endif // COMPONENTS_SYNC_BASE_MODEL_TYPE_H_
OLDNEW
« no previous file with comments | « components/signin/core/browser/about_signin_internals.cc ('k') | components/sync/driver/about_sync_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698