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

Side by Side Diff: sync/internal_api/sync_encryption_handler_impl.cc

Issue 11638018: [sync] Componentize sync: Part 5: Eliminate filename collisions in sync.gyp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove comments Created 8 years 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
OLDNEW
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/internal_api/sync_encryption_handler_impl.h" 5 #include "sync/internal_api/sync_encryption_handler_impl.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/json/json_string_value_serializer.h" 12 #include "base/json/json_string_value_serializer.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "base/tracked_objects.h" 15 #include "base/tracked_objects.h"
16 #include "base/metrics/histogram.h" 16 #include "base/metrics/histogram.h"
17 #include "sync/internal_api/public/read_node.h" 17 #include "sync/internal_api/public/read_node.h"
18 #include "sync/internal_api/public/read_transaction.h" 18 #include "sync/internal_api/public/read_transaction.h"
19 #include "sync/internal_api/public/user_share.h" 19 #include "sync/internal_api/public/user_share.h"
20 #include "sync/internal_api/public/util/experiments.h" 20 #include "sync/internal_api/public/util/experiments.h"
21 #include "sync/internal_api/public/write_node.h" 21 #include "sync/internal_api/public/write_node.h"
22 #include "sync/internal_api/public/write_transaction.h" 22 #include "sync/internal_api/public/write_transaction.h"
23 #include "sync/internal_api/public/util/sync_string_conversions.h" 23 #include "sync/internal_api/public/util/sync_string_conversions.h"
24 #include "sync/protocol/encryption.pb.h" 24 #include "sync/protocol/encryption.pb.h"
25 #include "sync/protocol/nigori_specifics.pb.h" 25 #include "sync/protocol/nigori_specifics.pb.h"
26 #include "sync/protocol/sync.pb.h" 26 #include "sync/protocol/sync.pb.h"
27 #include "sync/syncable/base_transaction.h"
28 #include "sync/syncable/directory.h" 27 #include "sync/syncable/directory.h"
29 #include "sync/syncable/entry.h" 28 #include "sync/syncable/entry.h"
30 #include "sync/syncable/nigori_util.h" 29 #include "sync/syncable/nigori_util.h"
30 #include "sync/syncable/syncable_base_transaction.h"
31 #include "sync/util/cryptographer.h" 31 #include "sync/util/cryptographer.h"
32 #include "sync/util/encryptor.h" 32 #include "sync/util/encryptor.h"
33 #include "sync/util/time.h" 33 #include "sync/util/time.h"
34 34
35 namespace syncer { 35 namespace syncer {
36 36
37 namespace { 37 namespace {
38 38
39 // The maximum number of times we will automatically overwrite the nigori node 39 // The maximum number of times we will automatically overwrite the nigori node
40 // because the encryption keys don't match (per chrome instantiation). 40 // because the encryption keys don't match (per chrome instantiation).
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 1574
1575 base::Time SyncEncryptionHandlerImpl::GetExplicitPassphraseTime() const { 1575 base::Time SyncEncryptionHandlerImpl::GetExplicitPassphraseTime() const {
1576 if (passphrase_type_ == FROZEN_IMPLICIT_PASSPHRASE) 1576 if (passphrase_type_ == FROZEN_IMPLICIT_PASSPHRASE)
1577 return migration_time(); 1577 return migration_time();
1578 else if (passphrase_type_ == CUSTOM_PASSPHRASE) 1578 else if (passphrase_type_ == CUSTOM_PASSPHRASE)
1579 return custom_passphrase_time(); 1579 return custom_passphrase_time();
1580 return base::Time(); 1580 return base::Time();
1581 } 1581 }
1582 1582
1583 } // namespace browser_sync 1583 } // namespace browser_sync
OLDNEW
« no previous file with comments | « sync/internal_api/read_transaction.cc ('k') | sync/internal_api/sync_encryption_handler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698