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

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

Issue 10699044: [Sync] Move sync/{internal_api,syncable} into syncer namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 years, 5 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/syncable/mutable_entry.cc ('k') | sync/syncable/nigori_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Various utility methods for nigori-based multi-type encryption. 5 // Various utility methods for nigori-based multi-type encryption.
6 6
7 #ifndef SYNC_SYNCABLE_NIGORI_UTIL_H_ 7 #ifndef SYNC_SYNCABLE_NIGORI_UTIL_H_
8 #define SYNC_SYNCABLE_NIGORI_UTIL_H_ 8 #define SYNC_SYNCABLE_NIGORI_UTIL_H_
9 #pragma once 9 #pragma once
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "sync/internal_api/public/syncable/model_type.h" 12 #include "sync/internal_api/public/syncable/model_type.h"
13 #include "sync/protocol/nigori_specifics.pb.h" 13 #include "sync/protocol/nigori_specifics.pb.h"
14 14
15 namespace syncer {
16 class Cryptographer;
17 }
18
19 namespace sync_pb { 15 namespace sync_pb {
20 class EntitySpecifics; 16 class EntitySpecifics;
21 } 17 }
22 18
19 namespace syncer {
20 class Cryptographer;
21
23 namespace syncable { 22 namespace syncable {
24 23
25 const char kEncryptedString[] = "encrypted"; 24 const char kEncryptedString[] = "encrypted";
26 25
27 class BaseTransaction; 26 class BaseTransaction;
28 class Entry; 27 class Entry;
29 class MutableEntry; 28 class MutableEntry;
30 class WriteTransaction; 29 class WriteTransaction;
31 30
32 // Check if our unsyced changes are encrypted if they need to be based on 31 // Check if our unsyced changes are encrypted if they need to be based on
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 63
65 // Stores |new_specifics| into |entry|, encrypting if necessary. 64 // Stores |new_specifics| into |entry|, encrypting if necessary.
66 // Returns false if an error encrypting occurred (does not modify |entry|). 65 // Returns false if an error encrypting occurred (does not modify |entry|).
67 // Note: gracefully handles new_specifics aliasing with entry->Get(SPECIFICS). 66 // Note: gracefully handles new_specifics aliasing with entry->Get(SPECIFICS).
68 bool UpdateEntryWithEncryption( 67 bool UpdateEntryWithEncryption(
69 syncer::Cryptographer* cryptographer, 68 syncer::Cryptographer* cryptographer,
70 const sync_pb::EntitySpecifics& new_specifics, 69 const sync_pb::EntitySpecifics& new_specifics,
71 MutableEntry* entry); 70 MutableEntry* entry);
72 71
73 } // namespace syncable 72 } // namespace syncable
73 } // namespace syncer
74 74
75 #endif // SYNC_SYNCABLE_NIGORI_UTIL_H_ 75 #endif // SYNC_SYNCABLE_NIGORI_UTIL_H_
OLDNEW
« no previous file with comments | « sync/syncable/mutable_entry.cc ('k') | sync/syncable/nigori_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698