| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/password_store.h" | 5 #include "chrome/browser/password_manager/password_store.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 PasswordStore::PasswordStore() { | 31 PasswordStore::PasswordStore() { |
| 32 } | 32 } |
| 33 | 33 |
| 34 bool PasswordStore::Init() { | 34 bool PasswordStore::Init() { |
| 35 ReportMetrics(); | 35 ReportMetrics(); |
| 36 return true; | 36 return true; |
| 37 } | 37 } |
| 38 | 38 |
| 39 void PasswordStore::Shutdown() { | |
| 40 } | |
| 41 | |
| 42 void PasswordStore::AddLogin(const PasswordForm& form) { | 39 void PasswordStore::AddLogin(const PasswordForm& form) { |
| 43 ScheduleTask(base::Bind(&PasswordStore::WrapModificationTask, this, | 40 ScheduleTask(base::Bind(&PasswordStore::WrapModificationTask, this, |
| 44 base::Closure(base::Bind(&PasswordStore::AddLoginImpl, this, form)))); | 41 base::Closure(base::Bind(&PasswordStore::AddLoginImpl, this, form)))); |
| 45 } | 42 } |
| 46 | 43 |
| 47 void PasswordStore::UpdateLogin(const PasswordForm& form) { | 44 void PasswordStore::UpdateLogin(const PasswordForm& form) { |
| 48 ScheduleTask(base::Bind(&PasswordStore::WrapModificationTask, this, | 45 ScheduleTask(base::Bind(&PasswordStore::WrapModificationTask, this, |
| 49 base::Closure(base::Bind(&PasswordStore::UpdateLoginImpl, this, form)))); | 46 base::Closure(base::Bind(&PasswordStore::UpdateLoginImpl, this, form)))); |
| 50 } | 47 } |
| 51 | 48 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 138 |
| 142 BrowserThread::PostTask( | 139 BrowserThread::PostTask( |
| 143 BrowserThread::UI, FROM_HERE, | 140 BrowserThread::UI, FROM_HERE, |
| 144 base::Bind(&PasswordStore::NotifyLoginsChanged, this)); | 141 base::Bind(&PasswordStore::NotifyLoginsChanged, this)); |
| 145 } | 142 } |
| 146 | 143 |
| 147 void PasswordStore::NotifyLoginsChanged() { | 144 void PasswordStore::NotifyLoginsChanged() { |
| 148 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 145 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 149 FOR_EACH_OBSERVER(Observer, observers_, OnLoginsChanged()); | 146 FOR_EACH_OBSERVER(Observer, observers_, OnLoginsChanged()); |
| 150 } | 147 } |
| OLD | NEW |