summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 09:20:39 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 09:20:39 +0000
commit42e89030ac3293414aa3c3e71994015a2f7d76f8 (patch)
treec92f871031fd5afc2b40ee6cb317e582b2cbaa84
parentd5e04ce616faf38eaae56c9c49f802aa672405ec (diff)
downloadchromium_src-42e89030ac3293414aa3c3e71994015a2f7d76f8.zip
chromium_src-42e89030ac3293414aa3c3e71994015a2f7d76f8.tar.gz
chromium_src-42e89030ac3293414aa3c3e71994015a2f7d76f8.tar.bz2
Add Sync data type for managed users.
TBR=atwilson@chromium.org BUG=228833 Review URL: https://chromiumcodereview.appspot.com/15177003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202026 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/glue/model_association_manager.cc3
-rw-r--r--chrome/browser/sync/profile_sync_service.cc2
-rw-r--r--chrome/browser/sync/sync_prefs.cc2
-rw-r--r--chrome/browser/ui/webui/sync_setup_handler.cc2
-rw-r--r--chrome/common/pref_names.cc1
-rw-r--r--chrome/common/pref_names.h1
-rw-r--r--sync/internal_api/base_node.cc5
-rw-r--r--sync/internal_api/public/base/model_type.h4
-rw-r--r--sync/internal_api/public/base_node.h4
-rw-r--r--sync/internal_api/public/write_node.h4
-rw-r--r--sync/internal_api/write_node.cc7
-rw-r--r--sync/protocol/managed_user_specifics.proto26
-rw-r--r--sync/protocol/proto_value_conversions.cc10
-rw-r--r--sync/protocol/proto_value_conversions.h4
-rw-r--r--sync/protocol/proto_value_conversions_unittest.cc7
-rw-r--r--sync/protocol/sync.proto2
-rw-r--r--sync/sync_proto.gypi1
-rw-r--r--sync/syncable/model_type.cc25
-rw-r--r--sync/syncable/nigori_util.cc4
-rw-r--r--sync/tools/testserver/chromiumsync.py8
-rw-r--r--sync/util/data_type_histogram.h5
21 files changed, 120 insertions, 7 deletions
diff --git a/chrome/browser/sync/glue/model_association_manager.cc b/chrome/browser/sync/glue/model_association_manager.cc
index e47c6c0..0e435e8 100644
--- a/chrome/browser/sync/glue/model_association_manager.cc
+++ b/chrome/browser/sync/glue/model_association_manager.cc
@@ -30,6 +30,9 @@ static const syncer::ModelType kStartOrder[] = {
syncer::EXPERIMENTS, // Listed for completeness.
syncer::PROXY_TABS, // Listed for completeness.
syncer::BOOKMARKS, // UI thread datatypes.
+ syncer::MANAGED_USERS, // Syncing managed users on initial login might
+ // block creating a new managed user, so we
+ // want to do it early.
syncer::PREFERENCES,
syncer::PRIORITY_PREFERENCES,
syncer::EXTENSIONS,
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 818d579..40ee817 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1473,7 +1473,7 @@ const browser_sync::user_selectable_type::UserSelectableSyncType
browser_sync::user_selectable_type::PROXY_TABS
};
- COMPILE_ASSERT(27 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram);
+ COMPILE_ASSERT(28 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram);
if (!sync_everything) {
const syncer::ModelTypeSet current_types = GetPreferredDataTypes();
diff --git a/chrome/browser/sync/sync_prefs.cc b/chrome/browser/sync/sync_prefs.cc
index 9c5ac80..e005f91 100644
--- a/chrome/browser/sync/sync_prefs.cc
+++ b/chrome/browser/sync/sync_prefs.cc
@@ -351,6 +351,8 @@ const char* SyncPrefs::GetPrefNameForDataType(syncer::ModelType data_type) {
return prefs::kSyncTabs;
case syncer::PRIORITY_PREFERENCES:
return prefs::kSyncPriorityPreferences;
+ case syncer::MANAGED_USERS:
+ return prefs::kSyncManagedUsers;
default:
break;
}
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 1381109..d2a0e8f 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -94,7 +94,7 @@ const char* kDataTypeNames[] = {
"tabs"
};
-COMPILE_ASSERT(27 == syncer::MODEL_TYPE_COUNT,
+COMPILE_ASSERT(28 == syncer::MODEL_TYPE_COUNT,
update_kDataTypeNames_to_match_UserSelectableTypes);
typedef std::map<syncer::ModelType, const char*> ModelTypeNameMap;
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index 515c93e..f58fbb1 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1781,6 +1781,7 @@ const char kSyncFaviconImages[] = "sync.favicon_images";
const char kSyncFaviconTracking[] = "sync.favicon_tracking";
const char kSyncHistoryDeleteDirectives[] = "sync.history_delete_directives";
const char kSyncManagedUserSettings[] = "sync.managed_user_settings";
+const char kSyncManagedUsers[] = "sync.managed_users";
const char kSyncPasswords[] = "sync.passwords";
const char kSyncPreferences[] = "sync.preferences";
const char kSyncPriorityPreferences[] = "sync.priority_preferences";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index aefd810..c33a0be 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -633,6 +633,7 @@ extern const char kSyncFaviconImages[];
extern const char kSyncFaviconTracking[];
extern const char kSyncHistoryDeleteDirectives[];
extern const char kSyncManagedUserSettings[];
+extern const char kSyncManagedUsers[];
extern const char kSyncPasswords[];
extern const char kSyncPreferences[];
extern const char kSyncPriorityPreferences[];
diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc
index 1e1513b1..88dec8c 100644
--- a/sync/internal_api/base_node.cc
+++ b/sync/internal_api/base_node.cc
@@ -335,6 +335,11 @@ const sync_pb::ManagedUserSettingSpecifics&
return GetEntitySpecifics().managed_user_setting();
}
+const sync_pb::ManagedUserSpecifics& BaseNode::GetManagedUserSpecifics() const {
+ DCHECK_EQ(GetModelType(), MANAGED_USERS);
+ return GetEntitySpecifics().managed_user();
+}
+
const sync_pb::DeviceInfoSpecifics& BaseNode::GetDeviceInfoSpecifics() const {
DCHECK_EQ(GetModelType(), DEVICE_INFO);
return GetEntitySpecifics().device_info();
diff --git a/sync/internal_api/public/base/model_type.h b/sync/internal_api/public/base/model_type.h
index 268715a..59f970f 100644
--- a/sync/internal_api/public/base/model_type.h
+++ b/sync/internal_api/public/base/model_type.h
@@ -95,6 +95,10 @@ enum ModelType {
PRIORITY_PREFERENCES,
// Managed user settings.
MANAGED_USER_SETTINGS,
+ // Managed users. Every managed user is a profile that is configured remotely
+ // by this user and can have restrictions applied. MANAGED_USERS and
+ // MANAGED_USER_SETTINGS can not be encrypted.
+ MANAGED_USERS,
// ---- Proxy types ----
// Proxy types are excluded from the sync protocol, but are still considered
diff --git a/sync/internal_api/public/base_node.h b/sync/internal_api/public/base_node.h
index 7cf2edb..3c56b5e 100644
--- a/sync/internal_api/public/base_node.h
+++ b/sync/internal_api/public/base_node.h
@@ -158,6 +158,10 @@ class SYNC_EXPORT BaseNode {
const sync_pb::ManagedUserSettingSpecifics&
GetManagedUserSettingSpecifics() const;
+ // Getter specific to the MANAGED_USERS datatype. Returns protobuf data.
+ // Can only be called if GetModelType() == MANAGED_USERS.
+ const sync_pb::ManagedUserSpecifics& GetManagedUserSpecifics() const;
+
// Getter specific to the DEVICE_INFO datatype. Returns protobuf
// data. Can only be called if GetModelType() == DEVICE_INFO.
const sync_pb::DeviceInfoSpecifics& GetDeviceInfoSpecifics() const;
diff --git a/sync/internal_api/public/write_node.h b/sync/internal_api/public/write_node.h
index 3cb4039..d3781e8 100644
--- a/sync/internal_api/public/write_node.h
+++ b/sync/internal_api/public/write_node.h
@@ -165,6 +165,10 @@ class SYNC_EXPORT WriteNode : public BaseNode {
void SetManagedUserSettingSpecifics(
const sync_pb::ManagedUserSettingSpecifics& specifics);
+ // Set the managed user setting specifics (name and value).
+ // Should only be called if GetModelType() == MANAGED_USERS.
+ void SetManagedUserSpecifics(const sync_pb::ManagedUserSpecifics& specifics);
+
// Set the device info specifics.
// Should only be called if GetModelType() == DEVICE_INFO.
void SetDeviceInfoSpecifics(const sync_pb::DeviceInfoSpecifics& specifics);
diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc
index db461d6..22496c1 100644
--- a/sync/internal_api/write_node.cc
+++ b/sync/internal_api/write_node.cc
@@ -193,6 +193,13 @@ void WriteNode::SetManagedUserSettingSpecifics(
SetEntitySpecifics(entity_specifics);
}
+void WriteNode::SetManagedUserSpecifics(
+ const sync_pb::ManagedUserSpecifics& new_value) {
+ sync_pb::EntitySpecifics entity_specifics;
+ entity_specifics.mutable_managed_user()->CopyFrom(new_value);
+ SetEntitySpecifics(entity_specifics);
+}
+
void WriteNode::SetDeviceInfoSpecifics(
const sync_pb::DeviceInfoSpecifics& new_value) {
sync_pb::EntitySpecifics entity_specifics;
diff --git a/sync/protocol/managed_user_specifics.proto b/sync/protocol/managed_user_specifics.proto
new file mode 100644
index 0000000..c71bb29
--- /dev/null
+++ b/sync/protocol/managed_user_specifics.proto
@@ -0,0 +1,26 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Sync protocol datatype extension for managed user settings.
+
+// Update proto_value_conversions{.h,.cc,_unittest.cc} if you change
+// any fields in this file.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+option retain_unknown_fields = true;
+
+package sync_pb;
+
+// Properties of managed user sync objects.
+message ManagedUserSpecifics {
+ // A randomly-generated identifier for the managed user.
+ optional string id = 1;
+ // The human-visible name of the managed user
+ optional string name = 2;
+ // This flag is set by the server to acknowledge that it has committed a
+ // newly created managed user.
+ optional bool acknowledged = 3 [default = false];
+}
diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc
index 3f5ef8e..6914a5d 100644
--- a/sync/protocol/proto_value_conversions.cc
+++ b/sync/protocol/proto_value_conversions.cc
@@ -423,6 +423,15 @@ base::DictionaryValue* ManagedUserSettingSpecificsToValue(
return value;
}
+base::DictionaryValue* ManagedUserSpecificsToValue(
+ const sync_pb::ManagedUserSpecifics& proto) {
+ base::DictionaryValue* value = new base::DictionaryValue();
+ SET_STR(id);
+ SET_STR(name);
+ SET_BOOL(acknowledged);
+ return value;
+}
+
base::DictionaryValue* NigoriSpecificsToValue(
const sync_pb::NigoriSpecifics& proto) {
base::DictionaryValue* value = new base::DictionaryValue();
@@ -552,6 +561,7 @@ base::DictionaryValue* EntitySpecificsToValue(
SET_FIELD(favicon_tracking, FaviconTrackingSpecificsToValue);
SET_FIELD(history_delete_directive, HistoryDeleteDirectiveSpecificsToValue);
SET_FIELD(managed_user_setting, ManagedUserSettingSpecificsToValue);
+ SET_FIELD(managed_user, ManagedUserSpecificsToValue);
SET_FIELD(nigori, NigoriSpecificsToValue);
SET_FIELD(password, PasswordSpecificsToValue);
SET_FIELD(preference, PreferenceSpecificsToValue);
diff --git a/sync/protocol/proto_value_conversions.h b/sync/protocol/proto_value_conversions.h
index 5a98758..8bcc26d 100644
--- a/sync/protocol/proto_value_conversions.h
+++ b/sync/protocol/proto_value_conversions.h
@@ -42,6 +42,7 @@ class GlobalIdDirective;
class HistoryDeleteDirectiveSpecifics;
class KeystoreEncryptionFlagsSpecifics;
class ManagedUserSettingSpecifics;
+class ManagedUserSpecifics;
class NigoriSpecifics;
class PasswordSpecifics;
class PasswordSpecificsData;
@@ -170,6 +171,9 @@ SYNC_EXPORT base::DictionaryValue* HistoryDeleteDirectiveSpecificsToValue(
SYNC_EXPORT_PRIVATE base::DictionaryValue* ManagedUserSettingSpecificsToValue(
const sync_pb::ManagedUserSettingSpecifics& managed_user_setting_specifics);
+SYNC_EXPORT_PRIVATE base::DictionaryValue* ManagedUserSpecificsToValue(
+ const sync_pb::ManagedUserSpecifics& managed_user_specifics);
+
SYNC_EXPORT_PRIVATE base::DictionaryValue* NigoriSpecificsToValue(
const sync_pb::NigoriSpecifics& nigori_specifics);
diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc
index fe2750c..792065c 100644
--- a/sync/protocol/proto_value_conversions_unittest.cc
+++ b/sync/protocol/proto_value_conversions_unittest.cc
@@ -53,7 +53,7 @@ TEST_F(ProtoValueConversionsTest, ProtoChangeCheck) {
// If this number changes, that means we added or removed a data
// type. Don't forget to add a unit test for {New
// type}SpecificsToValue below.
- EXPECT_EQ(27, MODEL_TYPE_COUNT);
+ EXPECT_EQ(28, MODEL_TYPE_COUNT);
// We'd also like to check if we changed any field in our messages.
// However, that's hard to do: sizeof could work, but it's
@@ -178,6 +178,10 @@ TEST_F(ProtoValueConversionsTest, ManagedUserSettingSpecificsToValue) {
TestSpecificsToValue(ManagedUserSettingSpecificsToValue);
}
+TEST_F(ProtoValueConversionsTest, ManagedUserSpecificsToValue) {
+ TestSpecificsToValue(ManagedUserSpecificsToValue);
+}
+
TEST_F(ProtoValueConversionsTest, NigoriSpecificsToValue) {
TestSpecificsToValue(NigoriSpecificsToValue);
}
@@ -237,6 +241,7 @@ TEST_F(ProtoValueConversionsTest, EntitySpecificsToValue) {
SET_FIELD(favicon_tracking);
SET_FIELD(history_delete_directive);
SET_FIELD(managed_user_setting);
+ SET_FIELD(managed_user);
SET_FIELD(nigori);
SET_FIELD(password);
SET_FIELD(preference);
diff --git a/sync/protocol/sync.proto b/sync/protocol/sync.proto
index 005275b..b89b9b7 100644
--- a/sync/protocol/sync.proto
+++ b/sync/protocol/sync.proto
@@ -33,6 +33,7 @@ import "get_updates_caller_info.proto";
import "history_delete_directive_specifics.proto";
import "nigori_specifics.proto";
import "managed_user_setting_specifics.proto";
+import "managed_user_specifics.proto";
import "password_specifics.proto";
import "preference_specifics.proto";
import "priority_preference_specifics.proto";
@@ -116,6 +117,7 @@ message EntitySpecifics {
optional FaviconTrackingSpecifics favicon_tracking = 181534;
optional FaviconImageSpecifics favicon_image = 182019;
optional ManagedUserSettingSpecifics managed_user_setting = 186662;
+ optional ManagedUserSpecifics managed_user = 194582;
}
message SyncEntity {
diff --git a/sync/sync_proto.gypi b/sync/sync_proto.gypi
index 04f5e35..bb79b4b 100644
--- a/sync/sync_proto.gypi
+++ b/sync/sync_proto.gypi
@@ -29,6 +29,7 @@
'protocol/history_delete_directive_specifics.proto',
'protocol/nigori_specifics.proto',
'protocol/managed_user_setting_specifics.proto',
+ 'protocol/managed_user_specifics.proto',
'protocol/password_specifics.proto',
'protocol/preference_specifics.proto',
'protocol/priority_preference_specifics.proto',
diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc
index 140d7ab..22ea71e 100644
--- a/sync/syncable/model_type.cc
+++ b/sync/syncable/model_type.cc
@@ -104,6 +104,9 @@ void AddDefaultFieldValue(ModelType datatype,
case MANAGED_USER_SETTINGS:
specifics->mutable_managed_user_setting();
break;
+ case MANAGED_USERS:
+ specifics->mutable_managed_user();
+ break;
default:
NOTREACHED() << "No known extension for model type.";
}
@@ -192,6 +195,8 @@ int GetSpecificsFieldNumberFromModelType(ModelType model_type) {
return sync_pb::EntitySpecifics::kFaviconTrackingFieldNumber;
case MANAGED_USER_SETTINGS:
return sync_pb::EntitySpecifics::kManagedUserSettingFieldNumber;
+ case MANAGED_USERS:
+ return sync_pb::EntitySpecifics::kManagedUserFieldNumber;
default:
NOTREACHED() << "No known extension for model type.";
return 0;
@@ -311,6 +316,9 @@ ModelType GetModelTypeFromSpecifics(const sync_pb::EntitySpecifics& specifics) {
if (specifics.has_managed_user_setting())
return MANAGED_USER_SETTINGS;
+ if (specifics.has_managed_user())
+ return MANAGED_USERS;
+
return UNSPECIFIED;
}
@@ -362,6 +370,8 @@ ModelTypeSet EncryptableUserTypes() {
encryptable_user_types.RemoveAll(PriorityUserTypes());
// Managed user settings are not encrypted since they are set server-side.
encryptable_user_types.Remove(MANAGED_USER_SETTINGS);
+ // Managed users are not encrypted since they are managed server-side.
+ encryptable_user_types.Remove(MANAGED_USERS);
// Proxy types have no sync representation and are therefore not encrypted.
// Note however that proxy types map to one or more protocol types, which
// may or may not be encrypted themselves.
@@ -452,6 +462,8 @@ const char* ModelTypeToString(ModelType model_type) {
return "Favicon Tracking";
case MANAGED_USER_SETTINGS:
return "Managed User Settings";
+ case MANAGED_USERS:
+ return "Managed Users";
case PROXY_TABS:
return "Tabs";
default:
@@ -521,6 +533,8 @@ int ModelTypeToHistogramInt(ModelType model_type) {
return 25;
case MANAGED_USER_SETTINGS:
return 26;
+ case MANAGED_USERS:
+ return 27;
// Silence a compiler warning.
case MODEL_TYPE_COUNT:
return 0;
@@ -604,6 +618,8 @@ ModelType ModelTypeFromString(const std::string& model_type_string) {
return FAVICON_TRACKING;
else if (model_type_string == "Managed User Settings")
return MANAGED_USER_SETTINGS;
+ else if (model_type_string == "Managed Users")
+ return MANAGED_USERS;
else if (model_type_string == "Tabs")
return PROXY_TABS;
else
@@ -694,6 +710,8 @@ std::string ModelTypeToRootTag(ModelType type) {
return "google_chrome_favicon_tracking";
case MANAGED_USER_SETTINGS:
return "google_chrome_managed_user_settings";
+ case MANAGED_USERS:
+ return "google_chrome_managed_users";
case PROXY_TABS:
return std::string();
default:
@@ -732,6 +750,7 @@ const char kDictionaryNotificationType[] = "DICTIONARY";
const char kFaviconImageNotificationType[] = "FAVICON_IMAGE";
const char kFaviconTrackingNotificationType[] = "FAVICON_TRACKING";
const char kManagedUserSettingNotificationType[] = "MANAGED_USER_SETTING";
+const char kManagedUserNotificationType[] = "MANAGED_USER";
} // namespace
bool RealModelTypeToNotificationType(ModelType model_type,
@@ -809,6 +828,9 @@ bool RealModelTypeToNotificationType(ModelType model_type,
case MANAGED_USER_SETTINGS:
*notification_type = kManagedUserSettingNotificationType;
return true;
+ case MANAGED_USERS:
+ *notification_type = kManagedUserNotificationType;
+ return true;
default:
break;
}
@@ -890,6 +912,9 @@ bool NotificationTypeToRealModelType(const std::string& notification_type,
} else if (notification_type == kManagedUserSettingNotificationType) {
*model_type = MANAGED_USER_SETTINGS;
return true;
+ } else if (notification_type == kManagedUserNotificationType) {
+ *model_type = MANAGED_USERS;
+ return true;
}
*model_type = UNSPECIFIED;
return false;
diff --git a/sync/syncable/nigori_util.cc b/sync/syncable/nigori_util.cc
index 5c88316..3e456dd 100644
--- a/sync/syncable/nigori_util.cc
+++ b/sync/syncable/nigori_util.cc
@@ -242,7 +242,7 @@ void UpdateNigoriFromEncryptedTypes(ModelTypeSet encrypted_types,
bool encrypt_everything,
sync_pb::NigoriSpecifics* nigori) {
nigori->set_encrypt_everything(encrypt_everything);
- COMPILE_ASSERT(27 == MODEL_TYPE_COUNT, UpdateEncryptedTypes);
+ COMPILE_ASSERT(28 == MODEL_TYPE_COUNT, UpdateEncryptedTypes);
nigori->set_encrypt_bookmarks(
encrypted_types.Has(BOOKMARKS));
nigori->set_encrypt_preferences(
@@ -276,7 +276,7 @@ ModelTypeSet GetEncryptedTypesFromNigori(
return ModelTypeSet::All();
ModelTypeSet encrypted_types;
- COMPILE_ASSERT(27 == MODEL_TYPE_COUNT, UpdateEncryptedTypes);
+ COMPILE_ASSERT(28 == MODEL_TYPE_COUNT, UpdateEncryptedTypes);
if (nigori.encrypt_bookmarks())
encrypted_types.Put(BOOKMARKS);
if (nigori.encrypt_preferences())
diff --git a/sync/tools/testserver/chromiumsync.py b/sync/tools/testserver/chromiumsync.py
index fbd3c5b..af43415 100644
--- a/sync/tools/testserver/chromiumsync.py
+++ b/sync/tools/testserver/chromiumsync.py
@@ -32,6 +32,7 @@ import favicon_image_specifics_pb2
import favicon_tracking_specifics_pb2
import history_delete_directive_specifics_pb2
import managed_user_setting_specifics_pb2
+import managed_user_specifics_pb2
import nigori_specifics_pb2
import password_specifics_pb2
import preference_specifics_pb2
@@ -62,6 +63,7 @@ ALL_TYPES = (
EXTENSIONS,
HISTORY_DELETE_DIRECTIVE,
MANAGED_USER_SETTING,
+ MANAGED_USER,
NIGORI,
PASSWORD,
PREFERENCE,
@@ -73,7 +75,7 @@ ALL_TYPES = (
TYPED_URL,
EXTENSION_SETTINGS,
FAVICON_IMAGES,
- FAVICON_TRACKING) = range(25)
+ FAVICON_TRACKING) = range(26)
# An enumeration on the frequency at which the server should send errors
# to the client. This would be specified by the url that triggers the error.
@@ -105,6 +107,7 @@ SYNC_TYPE_TO_DESCRIPTOR = {
FAVICON_TRACKING: SYNC_TYPE_FIELDS['favicon_tracking'],
HISTORY_DELETE_DIRECTIVE: SYNC_TYPE_FIELDS['history_delete_directive'],
MANAGED_USER_SETTING: SYNC_TYPE_FIELDS['managed_user_setting'],
+ MANAGED_USER: SYNC_TYPE_FIELDS['managed_user'],
NIGORI: SYNC_TYPE_FIELDS['nigori'],
PASSWORD: SYNC_TYPE_FIELDS['password'],
PREFERENCE: SYNC_TYPE_FIELDS['preference'],
@@ -497,6 +500,9 @@ class SyncDataModel(object):
PermanentItem('google_chrome_managed_user_settings',
name='Managed User Settings',
parent_tag=ROOT_ID, sync_type=MANAGED_USER_SETTING),
+ PermanentItem('google_chrome_managed_users',
+ name='Managed Users',
+ parent_tag=ROOT_ID, sync_type=MANAGED_USER),
PermanentItem('google_chrome_nigori', name='Nigori',
parent_tag=ROOT_ID, sync_type=NIGORI),
PermanentItem('google_chrome_passwords', name='Passwords',
diff --git a/sync/util/data_type_histogram.h b/sync/util/data_type_histogram.h
index c2d8542..c149839 100644
--- a/sync/util/data_type_histogram.h
+++ b/sync/util/data_type_histogram.h
@@ -108,7 +108,10 @@
case ::syncer::MANAGED_USER_SETTINGS: \
PER_DATA_TYPE_MACRO("ManagedUserSetting"); \
break; \
- case ::syncer::PROXY_TABS :\
+ case ::syncer::MANAGED_USERS: \
+ PER_DATA_TYPE_MACRO("ManagedUser"); \
+ break; \
+ case ::syncer::PROXY_TABS: \
PER_DATA_TYPE_MACRO("Tabs"); \
break; \
default: \