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

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

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/nigori_util.h ('k') | sync/syncable/nigori_util_unittest.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 #include "sync/syncable/nigori_util.h" 5 #include "sync/syncable/nigori_util.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/json/json_writer.h" 11 #include "base/json/json_writer.h"
12 #include "sync/syncable/directory.h" 12 #include "sync/syncable/directory.h"
13 #include "sync/syncable/entry.h" 13 #include "sync/syncable/entry.h"
14 #include "sync/syncable/mutable_entry.h" 14 #include "sync/syncable/mutable_entry.h"
15 #include "sync/syncable/syncable_util.h" 15 #include "sync/syncable/syncable_util.h"
16 #include "sync/syncable/write_transaction.h" 16 #include "sync/syncable/write_transaction.h"
17 #include "sync/util/cryptographer.h" 17 #include "sync/util/cryptographer.h"
18 18
19 namespace syncer {
19 namespace syncable { 20 namespace syncable {
20 21
21 bool ProcessUnsyncedChangesForEncryption( 22 bool ProcessUnsyncedChangesForEncryption(
22 WriteTransaction* const trans, 23 WriteTransaction* const trans,
23 syncer::Cryptographer* cryptographer) { 24 syncer::Cryptographer* cryptographer) {
24 DCHECK(cryptographer->is_ready()); 25 DCHECK(cryptographer->is_ready());
25 // Get list of all datatypes with unsynced changes. It's possible that our 26 // Get list of all datatypes with unsynced changes. It's possible that our
26 // local changes need to be encrypted if encryption for that datatype was 27 // local changes need to be encrypted if encryption for that datatype was
27 // just turned on (and vice versa). 28 // just turned on (and vice versa).
28 // Note: we do not attempt to re-encrypt data with a new key here as key 29 // Note: we do not attempt to re-encrypt data with a new key here as key
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 241 }
241 entry->Put(syncable::SPECIFICS, generated_specifics); 242 entry->Put(syncable::SPECIFICS, generated_specifics);
242 DVLOG(1) << "Overwriting specifics of type " 243 DVLOG(1) << "Overwriting specifics of type "
243 << syncable::ModelTypeToString(type) 244 << syncable::ModelTypeToString(type)
244 << " and marking for syncing."; 245 << " and marking for syncing.";
245 syncable::MarkForSyncing(entry); 246 syncable::MarkForSyncing(entry);
246 return true; 247 return true;
247 } 248 }
248 249
249 } // namespace syncable 250 } // namespace syncable
251 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/syncable/nigori_util.h ('k') | sync/syncable/nigori_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698