diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 05:17:29 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-12 05:17:29 +0000 |
commit | 807c6597d34336d8af58995ee4fd1489cc88b007 (patch) | |
tree | 366474a8e55fec37451705153e82e3b0a910d867 /sync/internal_api/base_node.cc | |
parent | e512c79c74ff343b1459dc607d45cb8ea8e68c26 (diff) | |
download | chromium_src-807c6597d34336d8af58995ee4fd1489cc88b007.zip chromium_src-807c6597d34336d8af58995ee4fd1489cc88b007.tar.gz chromium_src-807c6597d34336d8af58995ee4fd1489cc88b007.tar.bz2 |
[Sync] Fix long bookmark title syncing
Sync internally performs some truncation on bookmark titles if they are too
long. This means though that the association logic will look at the truncated
and non-truncated versions and decide they are different bookmarks, resulting
in duplication. We fix this by performing the same truncation at bookmark
comparison time in the associator.
BUG=334537
Review URL: https://codereview.chromium.org/179053004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/base_node.cc')
-rw-r--r-- | sync/internal_api/base_node.cc | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc index 887e642..ac04768 100644 --- a/sync/internal_api/base_node.cc +++ b/sync/internal_api/base_node.cc @@ -40,24 +40,6 @@ static int64 IdToMetahandle(syncable::BaseTransaction* trans, return entry.GetMetahandle(); } -static bool EndsWithSpace(const std::string& string) { - return !string.empty() && *string.rbegin() == ' '; -} - -// In the reverse direction, if a server name matches the pattern of a -// server-illegal name followed by one or more spaces, remove the trailing -// space. -static void ServerNameToSyncAPIName(const std::string& server_name, - std::string* out) { - CHECK(out); - int length_to_copy = server_name.length(); - if (IsNameServerIllegalAfterTrimming(server_name) && - EndsWithSpace(server_name)) { - --length_to_copy; - } - *out = std::string(server_name.c_str(), length_to_copy); -} - BaseNode::BaseNode() : password_data_(new sync_pb::PasswordSpecificsData) {} BaseNode::~BaseNode() {} |