Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Unified Diff: chrome/browser/sync/engine/syncer_util.cc

Issue 340055: String cleanup in sync code (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/engine/syncer_unittest.cc ('k') | chrome/browser/sync/engine/verify_updates_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncer_util.cc
===================================================================
--- chrome/browser/sync/engine/syncer_util.cc (revision 30948)
+++ chrome/browser/sync/engine/syncer_util.cc (working copy)
@@ -15,7 +15,6 @@
#include "chrome/browser/sync/syncable/directory_manager.h"
#include "chrome/browser/sync/syncable/syncable.h"
#include "chrome/browser/sync/syncable/syncable_changes_version.h"
-#include "chrome/browser/sync/util/character_set_converters.h"
#include "chrome/browser/sync/util/path_helpers.h"
#include "chrome/browser/sync/util/sync_types.h"
@@ -329,15 +328,13 @@
local_entry->Put(SERVER_IS_BOOKMARK_OBJECT, server_entry.has_bookmarkdata());
local_entry->Put(SERVER_IS_DIR, server_entry.IsFolder());
if (server_entry.has_singleton_tag()) {
- PathString tag;
- AppendUTF8ToPathString(server_entry.singleton_tag(), &tag);
+ const PathString& tag = server_entry.singleton_tag();
local_entry->Put(SINGLETON_TAG, tag);
}
if (server_entry.has_bookmarkdata() && !server_entry.deleted()) {
const SyncEntity::BookmarkData& bookmark = server_entry.bookmarkdata();
if (bookmark.has_bookmark_url()) {
- PathString url;
- AppendUTF8ToPathString(bookmark.bookmark_url(), &url);
+ const PathString& url = bookmark.bookmark_url();
local_entry->Put(SERVER_BOOKMARK_URL, url);
}
if (bookmark.has_bookmark_favicon()) {
@@ -371,9 +368,8 @@
const sync_pb::ExtendedAttributes & extended_attributes =
server_entry.extended_attributes();
for (int i = 0; i < extended_attributes.extendedattribute_size(); i++) {
- PathString pathstring_key;
- AppendUTF8ToPathString(
- extended_attributes.extendedattribute(i).key(), &pathstring_key);
+ const PathString& pathstring_key =
+ extended_attributes.extendedattribute(i).key();
ExtendedAttributeKey key(local_entry->Get(META_HANDLE), pathstring_key);
MutableExtendedAttribute local_attribute(local_entry->write_transaction(),
CREATE, key);
« no previous file with comments | « chrome/browser/sync/engine/syncer_unittest.cc ('k') | chrome/browser/sync/engine/verify_updates_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698