OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/nigori_handler.h" | 14 #include "sync/syncable/nigori_handler.h" |
15 #include "sync/syncable/mutable_entry.h" | 15 #include "sync/syncable/mutable_entry.h" |
16 #include "sync/syncable/syncable_util.h" | 16 #include "sync/syncable/syncable_util.h" |
17 #include "sync/syncable/write_transaction.h" | 17 #include "sync/syncable/syncable_write_transaction.h" |
18 #include "sync/util/cryptographer.h" | 18 #include "sync/util/cryptographer.h" |
19 | 19 |
20 namespace syncer { | 20 namespace syncer { |
21 namespace syncable { | 21 namespace syncable { |
22 | 22 |
23 bool ProcessUnsyncedChangesForEncryption( | 23 bool ProcessUnsyncedChangesForEncryption( |
24 WriteTransaction* const trans) { | 24 WriteTransaction* const trans) { |
25 NigoriHandler* nigori_handler = trans->directory()->GetNigoriHandler(); | 25 NigoriHandler* nigori_handler = trans->directory()->GetNigoriHandler(); |
26 ModelTypeSet encrypted_types = nigori_handler->GetEncryptedTypes(trans); | 26 ModelTypeSet encrypted_types = nigori_handler->GetEncryptedTypes(trans); |
27 Cryptographer* cryptographer = trans->directory()->GetCryptographer(trans); | 27 Cryptographer* cryptographer = trans->directory()->GetCryptographer(trans); |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 encrypted_types.Put(APP_SETTINGS); | 308 encrypted_types.Put(APP_SETTINGS); |
309 if (nigori.encrypt_apps()) | 309 if (nigori.encrypt_apps()) |
310 encrypted_types.Put(APPS); | 310 encrypted_types.Put(APPS); |
311 if (nigori.encrypt_app_notifications()) | 311 if (nigori.encrypt_app_notifications()) |
312 encrypted_types.Put(APP_NOTIFICATIONS); | 312 encrypted_types.Put(APP_NOTIFICATIONS); |
313 return encrypted_types; | 313 return encrypted_types; |
314 } | 314 } |
315 | 315 |
316 } // namespace syncable | 316 } // namespace syncable |
317 } // namespace syncer | 317 } // namespace syncer |
OLD | NEW |