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

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

Issue 2830027: Remove extended attributes. The lame broken codepath in the DBS was causing (Closed)
Patch Set: Synced with TOT, resolved conflicts. Created 10 years, 6 months 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_util.h ('k') | chrome/browser/sync/protocol/sync.proto » ('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
diff --git a/chrome/browser/sync/engine/syncer_util.cc b/chrome/browser/sync/engine/syncer_util.cc
index 41181d6d7413472f52e51a66eba61429394ca840..8b5f7b9294c6f76ddb74954d5e97cf6a8a0a8ce9 100644
--- a/chrome/browser/sync/engine/syncer_util.cc
+++ b/chrome/browser/sync/engine/syncer_util.cc
@@ -30,7 +30,6 @@ using syncable::CTIME;
using syncable::ComparePathNames;
using syncable::Directory;
using syncable::Entry;
-using syncable::ExtendedAttributeKey;
using syncable::GET_BY_HANDLE;
using syncable::GET_BY_ID;
using syncable::ID;
@@ -42,7 +41,6 @@ using syncable::Id;
using syncable::META_HANDLE;
using syncable::MTIME;
using syncable::MutableEntry;
-using syncable::MutableExtendedAttribute;
using syncable::NEXT_ID;
using syncable::NON_UNIQUE_NAME;
using syncable::PARENT_ID;
@@ -407,28 +405,6 @@ void SyncerUtil::UpdateServerFieldsFromUpdate(
if (server_entry.version() > local_entry->Get(BASE_VERSION)) {
local_entry->Put(IS_UNAPPLIED_UPDATE, true);
}
- ApplyExtendedAttributes(local_entry, server_entry);
-}
-
-// static
-void SyncerUtil::ApplyExtendedAttributes(
- syncable::MutableEntry* local_entry,
- const SyncEntity& server_entry) {
- local_entry->DeleteAllExtendedAttributes(local_entry->write_transaction());
- if (server_entry.has_extended_attributes()) {
- const sync_pb::ExtendedAttributes & extended_attributes =
- server_entry.extended_attributes();
- for (int i = 0; i < extended_attributes.extendedattribute_size(); i++) {
- const string& string_key =
- extended_attributes.extendedattribute(i).key();
- ExtendedAttributeKey key(local_entry->Get(META_HANDLE), string_key);
- MutableExtendedAttribute local_attribute(local_entry->write_transaction(),
- CREATE, key);
- SyncerProtoUtil::CopyProtoBytesIntoBlob(
- extended_attributes.extendedattribute(i).value(),
- local_attribute.mutable_value());
- }
- }
}
// Creates a new Entry iff no Entry exists with the given id.
« no previous file with comments | « chrome/browser/sync/engine/syncer_util.h ('k') | chrome/browser/sync/protocol/sync.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698