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

Side by Side Diff: sync/syncable/nigori_handler.h

Issue 10827266: [Sync] Add SyncEncryptionHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/sync.gyp ('k') | sync/syncable/nigori_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SYNC_SYNCABLE_NIGORI_HANDLER_H_
6 #define SYNC_SYNCABLE_NIGORI_HANDLER_H_
7
8 #include "sync/internal_api/public/base/model_type.h"
9
10 namespace sync_pb {
11 class NigoriSpecifics;
12 }
13
14 namespace syncer {
15 namespace syncable {
16
17 class BaseTransaction;
18
19 // Sync internal interface for dealing with nigori node and querying
20 // the current set of encrypted types. Not thread safe, so a sync transaction
21 // must be held by a caller whenever invoking methods.
22 class NigoriHandler {
23 public:
24 NigoriHandler();
25 virtual ~NigoriHandler();
26
27 // Apply a nigori node update, updating the internal encryption state
28 // accordingly.
29 virtual void ApplyNigoriUpdate(
30 const sync_pb::NigoriSpecifics& nigori,
31 syncable::BaseTransaction* const trans) = 0;
32
33 // Store the current encrypt everything/encrypted types state into |nigori|.
34 virtual void UpdateNigoriFromEncryptedTypes(
35 sync_pb::NigoriSpecifics* nigori,
36 syncable::BaseTransaction* const trans) const = 0;
37
38 // Returns the set of currently encrypted types.
39 // TODO(zea): force callers to pass their syncable trans here.
40 virtual ModelTypeSet GetEncryptedTypes() const = 0;
41 };
42
43 } // namespace syncable
44 } // namespace syncer
45
46 #endif // SYNC_SYNCABLE_NIGORI_HANDLER_H_
OLDNEW
« no previous file with comments | « sync/sync.gyp ('k') | sync/syncable/nigori_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698