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

Side by Side Diff: components/autofill/core/browser/webdata/autofill_table_encryptor_factory.cc

Issue 2698103002: Allow embedder to use custom cryptography in Autofill table. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
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 #include "components/autofill/core/browser/webdata/system_encryptor.h"
7
8 namespace autofill {
9
10 AutofillTableEncryptorFactory::AutofillTableEncryptorFactory() {}
11
12 AutofillTableEncryptorFactory* AutofillTableEncryptorFactory::GetInstance() {
13 return base::Singleton<AutofillTableEncryptorFactory>::get();
14 }
15
16 std::unique_ptr<AutofillTableEncryptor>
17 AutofillTableEncryptorFactory::Create() {
18 if (delegate_) {
Roger McFarlane (Chromium) 2017/02/17 21:04:08 nit: no need for braces on single line if with no
19 return std::move(delegate_->Create());
Roger McFarlane (Chromium) 2017/02/17 21:04:08 nit: no need for std::move on return values
devarajn 2017/02/17 22:28:54 Done.
20 }
21
22 std::unique_ptr<AutofillTableEncryptor> encryptor(new SystemEncryptor());
23 return std::move(encryptor);
Roger McFarlane (Chromium) 2017/02/17 21:04:08 #inlcude "base/memory/ptr_util.h" return base::Mak
devarajn 2017/02/17 22:28:54 Done.
24 }
25
26 void AutofillTableEncryptorFactory::SetDelegate(
27 std::unique_ptr<autofill::AutofillTableEncryptorFactory::Delegate>
Roger McFarlane (Chromium) 2017/02/17 21:04:08 nit: no need for autofill:: nit: no need for Autof
devarajn 2017/02/17 22:28:54 Done.
28 delegate) {
29 delegate_ = std::move(delegate);
30 }
31
32 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698