diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-15 21:56:26 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-15 21:56:26 +0000 |
commit | e2709240cf5112d3d2cb83854149616dcd56b6ad (patch) | |
tree | a8886e9c5d8cdfb00a5731c867d63007cd383004 /sync/internal_api/write_node.cc | |
parent | 41491b412f95d8e440c30dde0cd5f895e6801c2b (diff) | |
download | chromium_src-e2709240cf5112d3d2cb83854149616dcd56b6ad.zip chromium_src-e2709240cf5112d3d2cb83854149616dcd56b6ad.tar.gz chromium_src-e2709240cf5112d3d2cb83854149616dcd56b6ad.tar.bz2 |
[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
Diffstat (limited to 'sync/internal_api/write_node.cc')
-rw-r--r-- | sync/internal_api/write_node.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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; |