| Index: components/sync/base/model_type.h
|
| diff --git a/sync/internal_api/public/base/model_type.h b/components/sync/base/model_type.h
|
| similarity index 94%
|
| rename from sync/internal_api/public/base/model_type.h
|
| rename to components/sync/base/model_type.h
|
| index 97edb97a1c1004a7f3d864c9a0cd54999c1446e3..004f7bb9fd8a5195e99a29ddcaa4bc571085c5b9 100644
|
| --- a/sync/internal_api/public/base/model_type.h
|
| +++ b/components/sync/base/model_type.h
|
| @@ -6,8 +6,8 @@
|
| // Each sync object is expected to have an immutable object type.
|
| // An object's type is inferred from the type of data it holds.
|
|
|
| -#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_
|
| -#define SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_
|
| +#ifndef COMPONENTS_SYNC_BASE_MODEL_TYPE_H_
|
| +#define COMPONENTS_SYNC_BASE_MODEL_TYPE_H_
|
|
|
| #include <map>
|
| #include <memory>
|
| @@ -16,8 +16,8 @@
|
| #include <string>
|
|
|
| #include "base/logging.h"
|
| -#include "sync/base/sync_export.h"
|
| -#include "sync/internal_api/public/base/enum_set.h"
|
| +#include "components/sync/base/enum_set.h"
|
| +#include "components/sync/base/sync_export.h"
|
|
|
| namespace base {
|
| class ListValue;
|
| @@ -36,7 +36,7 @@ namespace syncer {
|
| // private header.
|
|
|
| // A Java counterpart will be generated for this enum.
|
| -// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.sync
|
| +// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.sync
|
|
|
| // |kModelTypeInfoMap| struct entries are in the same order as their definition
|
| // in ModelType enum. Don't forget to update the |kModelTypeInfoMap| struct in
|
| @@ -166,8 +166,7 @@ enum ModelType {
|
|
|
| typedef EnumSet<ModelType, FIRST_REAL_MODEL_TYPE, LAST_REAL_MODEL_TYPE>
|
| ModelTypeSet;
|
| -typedef EnumSet<ModelType, UNSPECIFIED, LAST_REAL_MODEL_TYPE>
|
| - FullModelTypeSet;
|
| +typedef EnumSet<ModelType, UNSPECIFIED, LAST_REAL_MODEL_TYPE> FullModelTypeSet;
|
| typedef std::map<syncer::ModelType, const char*> ModelTypeNameMap;
|
|
|
| inline ModelType ModelTypeFromInt(int i) {
|
| @@ -189,8 +188,8 @@ SYNC_EXPORT ModelType GetModelType(const sync_pb::SyncEntity& sync_entity);
|
| // Extract the model type from an EntitySpecifics field. Note that there
|
| // are some ModelTypes (like TOP_LEVEL_FOLDER) that can't be inferred this way;
|
| // prefer using GetModelType where possible.
|
| -SYNC_EXPORT ModelType GetModelTypeFromSpecifics(
|
| - const sync_pb::EntitySpecifics& specifics);
|
| +SYNC_EXPORT ModelType
|
| +GetModelTypeFromSpecifics(const sync_pb::EntitySpecifics& specifics);
|
|
|
| // Protocol types are those types that have actual protocol buffer
|
| // representations. This distinguishes them from Proxy types, which have no
|
| @@ -268,8 +267,7 @@ SYNC_EXPORT ModelType GetModelTypeFromSpecificsFieldNumber(int field_number);
|
|
|
| // Return the field number of the EntitySpecifics field associated with
|
| // a model type.
|
| -SYNC_EXPORT int GetSpecificsFieldNumberFromModelType(
|
| - ModelType model_type);
|
| +SYNC_EXPORT int GetSpecificsFieldNumberFromModelType(ModelType model_type);
|
|
|
| FullModelTypeSet ToFullModelTypeSet(ModelTypeSet in);
|
|
|
| @@ -293,8 +291,7 @@ SYNC_EXPORT base::StringValue* ModelTypeToValue(ModelType model_type);
|
| SYNC_EXPORT ModelType ModelTypeFromValue(const base::Value& value);
|
|
|
| // Returns the ModelType corresponding to the name |model_type_string|.
|
| -SYNC_EXPORT ModelType ModelTypeFromString(
|
| - const std::string& model_type_string);
|
| +SYNC_EXPORT ModelType ModelTypeFromString(const std::string& model_type_string);
|
|
|
| // Returns the comma-separated string representation of |model_types|.
|
| SYNC_EXPORT std::string ModelTypeSetToString(ModelTypeSet model_types);
|
| @@ -304,8 +301,8 @@ SYNC_EXPORT std::ostream& operator<<(std::ostream& out,
|
| ModelTypeSet model_type_set);
|
|
|
| // Returns the set of comma-separated model types from |model_type_string|.
|
| -SYNC_EXPORT ModelTypeSet ModelTypeSetFromString(
|
| - const std::string& model_type_string);
|
| +SYNC_EXPORT ModelTypeSet
|
| +ModelTypeSetFromString(const std::string& model_type_string);
|
|
|
| SYNC_EXPORT std::unique_ptr<base::ListValue> ModelTypeSetToValue(
|
| ModelTypeSet model_types);
|
| @@ -363,4 +360,4 @@ SYNC_EXPORT bool TypeSupportsOrdering(ModelType model_type);
|
|
|
| } // namespace syncer
|
|
|
| -#endif // SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_
|
| +#endif // COMPONENTS_SYNC_BASE_MODEL_TYPE_H_
|
|
|