From e2709240cf5112d3d2cb83854149616dcd56b6ad Mon Sep 17 00:00:00 2001 From: "zea@chromium.org" Date: Mon, 15 Apr 2013 21:56:26 +0000 Subject: [Sync] Prevent redundant sync title changes Title truncation is now performed in the WriteNode, before we do the idempotency checks. By fixing this and an issue in the favicon cache that was leading to automatic rewrites we should significantly reduce the number of useless sync cycles. BUG=229658 Review URL: https://codereview.chromium.org/13953003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194243 0039d316-1c4b-4281-b951-d872f2087c98 --- sync/internal_api/write_node.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sync/internal_api/write_node.cc') diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc index 6ab752c..3a96764 100644 --- a/sync/internal_api/write_node.cc +++ b/sync/internal_api/write_node.cc @@ -4,6 +4,7 @@ #include "sync/internal_api/public/write_node.h" +#include "base/string_util.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "sync/internal_api/public/base_transaction.h" @@ -57,6 +58,7 @@ void WriteNode::SetTitle(const std::wstring& title) { new_legal_title = kEncryptedString; } else { SyncAPINameToServerName(WideToUTF8(title), &new_legal_title); + TruncateUTF8ToByteSize(new_legal_title, 255, &new_legal_title); } std::string current_legal_title; -- cgit v1.1