OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/password_manager/mock_password_store_service.h" | 5 #include "chrome/browser/password_manager/mock_password_store_service.h" |
6 | 6 |
7 #include "components/password_manager/core/browser/mock_password_store.h" | 7 #include "components/password_manager/core/browser/mock_password_store.h" |
8 | 8 |
9 // static | 9 // static |
10 KeyedService* MockPasswordStoreService::Build( | 10 KeyedService* MockPasswordStoreService::Build( |
11 content::BrowserContext* /*profile*/) { | 11 content::BrowserContext* /*profile*/) { |
12 scoped_refptr<password_manager::PasswordStore> store( | 12 scoped_refptr<password_manager::PasswordStore> store( |
13 new password_manager::MockPasswordStore); | 13 new password_manager::MockPasswordStore); |
14 if (!store.get() || !store->Init(syncer::SyncableService::StartSyncFlare())) | 14 if (!store.get() || !store->Init(syncer::SyncableService::StartSyncFlare())) |
15 return NULL; | 15 return nullptr; |
16 return new MockPasswordStoreService(store); | 16 return new MockPasswordStoreService(store); |
17 } | 17 } |
18 | 18 |
19 MockPasswordStoreService::MockPasswordStoreService( | 19 MockPasswordStoreService::MockPasswordStoreService( |
20 scoped_refptr<password_manager::PasswordStore> password_store) | 20 scoped_refptr<password_manager::PasswordStore> password_store) |
21 : PasswordStoreService(password_store) {} | 21 : PasswordStoreService(password_store) {} |
22 | 22 |
23 MockPasswordStoreService::~MockPasswordStoreService() {} | 23 MockPasswordStoreService::~MockPasswordStoreService() {} |
OLD | NEW |