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

Unified Diff: chrome/browser/sync/engine/syncer_proto_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.cc ('k') | chrome/browser/sync/engine/syncer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/engine/syncer_proto_util.cc
===================================================================
--- chrome/browser/sync/engine/syncer_proto_util.cc (revision 30948)
+++ chrome/browser/sync/engine/syncer_proto_util.cc (working copy)
@@ -11,7 +11,6 @@
#include "chrome/browser/sync/syncable/directory_manager.h"
#include "chrome/browser/sync/syncable/syncable-inl.h"
#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/character_set_converters.h"
using std::string;
using std::stringstream;
@@ -246,14 +245,9 @@
// static
syncable::SyncName SyncerProtoUtil::NameFromSyncEntity(
const SyncEntity& entry) {
- SyncName result(PSTR(""));
-
- AppendUTF8ToPathString(entry.name(), &result.value());
+ SyncName result(entry.name());
if (entry.has_non_unique_name()) {
- AppendUTF8ToPathString(entry.non_unique_name(),
- &result.non_unique_value());
- } else {
- result.non_unique_value() = result.value();
+ result.set_non_unique_value(entry.non_unique_name());
}
return result;
}
@@ -261,14 +255,9 @@
// static
syncable::SyncName SyncerProtoUtil::NameFromCommitEntryResponse(
const CommitResponse_EntryResponse& entry) {
- SyncName result(PSTR(""));
-
- AppendUTF8ToPathString(entry.name(), &result.value());
+ SyncName result(entry.name());
if (entry.has_non_unique_name()) {
- AppendUTF8ToPathString(entry.non_unique_name(),
- &result.non_unique_value());
- } else {
- result.non_unique_value() = result.value();
+ result.set_non_unique_value(entry.non_unique_name());
}
return result;
}
« no previous file with comments | « chrome/browser/sync/engine/syncer.cc ('k') | chrome/browser/sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698