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

Side by Side Diff: chrome/browser/password_manager/simple_password_store_mac.cc

Issue 1226303003: Start the migration of passwords from the Keychain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the test Created 5 years, 5 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/simple_password_store_mac.h" 5 #include "chrome/browser/password_manager/simple_password_store_mac.h"
6 6
7 SimplePasswordStoreMac::SimplePasswordStoreMac( 7 SimplePasswordStoreMac::SimplePasswordStoreMac(
8 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, 8 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
9 scoped_refptr<base::SingleThreadTaskRunner> background_thread_runner, 9 scoped_refptr<base::SingleThreadTaskRunner> background_thread_runner,
10 scoped_ptr<password_manager::LoginDatabase> login_db) 10 scoped_ptr<password_manager::LoginDatabase> login_db)
11 : PasswordStoreDefault(main_thread_runner, background_thread_runner, 11 : PasswordStoreDefault(main_thread_runner, background_thread_runner,
12 login_db.Pass()) { 12 login_db.Pass()) {
13 this->login_db()->set_clear_password_values(false); 13 if (this->login_db())
14 this->login_db()->set_clear_password_values(false);
14 } 15 }
15 16
16 SimplePasswordStoreMac::~SimplePasswordStoreMac() { 17 SimplePasswordStoreMac::~SimplePasswordStoreMac() {
17 } 18 }
18 19
20 void SimplePasswordStoreMac::InitWithTaskRunner(
21 scoped_refptr<base::SingleThreadTaskRunner> background_task_runner,
22 scoped_ptr<password_manager::LoginDatabase> login_db) {
23 db_thread_runner_ = background_task_runner;
24 DCHECK(GetBackgroundTaskRunner()->BelongsToCurrentThread());
25 set_login_db(login_db.Pass());
26 if (this->login_db())
27 this->login_db()->set_clear_password_values(false);
28 }
29
19 bool SimplePasswordStoreMac::Init( 30 bool SimplePasswordStoreMac::Init(
20 const syncer::SyncableService::StartSyncFlare& flare) { 31 const syncer::SyncableService::StartSyncFlare& flare) {
21 // All the initialization has to be done by the owner of the object. 32 NOTREACHED();
22 return true; 33 return false;
23 } 34 }
24
25 void SimplePasswordStoreMac::Shutdown() {
26 PasswordStoreDefault::Shutdown();
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698