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

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

Issue 9460047: sync: remove use of protobuf extensions in protocol to reduce static init overhead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fred's review Created 8 years, 10 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
Index: chrome/browser/sync/engine/conflict_resolver.cc
diff --git a/chrome/browser/sync/engine/conflict_resolver.cc b/chrome/browser/sync/engine/conflict_resolver.cc
index 77521ab1adebb1bba446727376668f83bdbbee01..c608ba56f628f880ae53fbd41f27b81edde3550a 100644
--- a/chrome/browser/sync/engine/conflict_resolver.cc
+++ b/chrome/browser/sync/engine/conflict_resolver.cc
@@ -227,25 +227,23 @@ ConflictResolver::ProcessSimpleConflict(WriteTransaction* trans,
// preserves their encryption keys).
sync_pb::EntitySpecifics specifics =
entry.Get(syncable::SERVER_SPECIFICS);
- sync_pb::NigoriSpecifics* nigori =
- specifics.MutableExtension(sync_pb::nigori);
+ sync_pb::NigoriSpecifics* server_nigori = specifics.mutable_nigori();
// Store the merged set of encrypted types (cryptographer->Update(..) will
// have merged the local types already).
- cryptographer->UpdateNigoriFromEncryptedTypes(nigori);
+ cryptographer->UpdateNigoriFromEncryptedTypes(server_nigori);
// The local set of keys is already merged with the server's set within
// the cryptographer. If we don't have pending keys we can store the
// merged set back immediately. Else we preserve the server keys and will
// update the nigori when the user provides the pending passphrase via
// SetPassphrase(..).
if (cryptographer->is_ready()) {
- cryptographer->GetKeys(nigori->mutable_encrypted());
+ cryptographer->GetKeys(server_nigori->mutable_encrypted());
}
// TODO(zea): Find a better way of doing this. As it stands, we have to
// update this code whenever we add a new non-cryptographer related field
// to the nigori node.
- if (entry.Get(syncable::SPECIFICS).GetExtension(sync_pb::nigori)
- .sync_tabs()) {
- nigori->set_sync_tabs(true);
+ if (entry.Get(syncable::SPECIFICS).nigori().sync_tabs()) {
+ server_nigori->set_sync_tabs(true);
}
// We deliberately leave the server's device information. This client will
// add it's own device information on restart.

Powered by Google App Engine
This is Rietveld 408576698