OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | |
please use gerrit instead
2017/02/22 19:05:42
no "(c)" necessary
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "components/autofill/core/browser/webdata/autofill_table_encryptor_fact ory.h" | |
6 | |
7 #include "base/memory/ptr_util.h" | |
8 #include "components/autofill/core/browser/webdata/system_encryptor.h" | |
9 | |
10 namespace autofill { | |
11 | |
12 AutofillTableEncryptorFactory::AutofillTableEncryptorFactory() {} | |
13 | |
14 AutofillTableEncryptorFactory* AutofillTableEncryptorFactory::GetInstance() { | |
15 return base::Singleton<AutofillTableEncryptorFactory>::get(); | |
16 } | |
17 | |
18 std::unique_ptr<AutofillTableEncryptor> | |
19 AutofillTableEncryptorFactory::Create() { | |
20 DCHECK(sequence_checker_.CalledOnValidSequence()); | |
21 if (delegate_) | |
please use gerrit instead
2017/02/22 19:05:42
Single line:
return delegate_ ? delgate_->Create(
devarajn
2017/02/22 19:24:26
Done.
| |
22 return delegate_->Create(); | |
23 | |
24 return base::MakeUnique<SystemEncryptor>(); | |
25 } | |
26 | |
27 void AutofillTableEncryptorFactory::SetDelegate( | |
28 std::unique_ptr<Delegate> delegate) { | |
29 DCHECK(sequence_checker_.CalledOnValidSequence()); | |
30 delegate_ = std::move(delegate); | |
31 } | |
32 | |
33 } // namespace autofill | |
OLD | NEW |