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

Unified Diff: chrome/browser/sync/glue/nigori_change_processor.h

Issue 10827266: [Sync] Add SyncEncryptionHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 4 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/glue/nigori_change_processor.h
diff --git a/chrome/browser/sync/glue/nigori_change_processor.h b/chrome/browser/sync/glue/nigori_change_processor.h
new file mode 100644
index 0000000000000000000000000000000000000000..73585dceb78d79eaab032669e2635b0a99c93640
--- /dev/null
+++ b/chrome/browser/sync/glue/nigori_change_processor.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SYNC_GLUE_NIGORI_CHANGE_PROCESSOR_H_
+#define CHROME_BROWSER_SYNC_GLUE_NIGORI_CHANGE_PROCESSOR_H_
+
+#include "sync/internal_api/public/base/model_type.h"
+
+namespace syncer {
+struct Experiments;
+class SyncEncryptionHandler;
+struct UserShare;
+}
+
+namespace browser_sync {
+
+// A change processor for handling updates to the nigori node. Interacts
+// directly with the SyncEncryptionHandler.
+// TODO(zea): implement the ChangeProcessor interface.
+class NigoriChangeProcessor {
+ public:
+ NigoriChangeProcessor(
+ syncer::SyncEncryptionHandler* encryption_handler);
+ virtual ~NigoriChangeProcessor();
+
+ // Merge local state and nigori node state.
+ void AssociateModels(syncer::UserShare* user_share);
+ // Disconnect the change processor from sync.
+ void DisassociateModels();
+
+ // Reads the nigori node to determine if any experimental features should
+ // be enabled.
+ // Note: opens a transaction. May be called on any thread.
+ bool ReceivedExperiments(syncer::Experiments* experiments);
+
+ // TODO(zea): ChangeProcessor implementation.
tim (not reviewing) 2012/08/12 23:31:20 Why is this called ChangeProcessor if it does most
Nicolas Zea 2012/08/13 22:56:38 Removed this file.
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NigoriChangeProcessor);
+
+ // This profile's user share. Used to create sync transactions.
+ syncer::UserShare* user_share_;
+
+ // Sync's encryption handler.
+ syncer::SyncEncryptionHandler* encryption_handler_;
+};
+
+} // namespace browser_sync
+
+#endif // CHROME_BROWSER_SYNC_GLUE_NIGORI_CHANGE_PROCESSOR_H_
« no previous file with comments | « no previous file | chrome/browser/sync/glue/nigori_change_processor.cc » ('j') | chrome/browser/sync/glue/sync_backend_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698