OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "chrome/browser/browser_thread.h" | 10 #include "chrome/browser/browser_thread.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 } | 21 } |
22 | 22 |
23 void PasswordStore::ScheduleTask(Task* task) { | 23 void PasswordStore::ScheduleTask(Task* task) { |
24 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, task); | 24 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, task); |
25 } | 25 } |
26 | 26 |
27 void PasswordStore::ReportMetrics() { | 27 void PasswordStore::ReportMetrics() { |
28 ScheduleTask(NewRunnableMethod(this, &PasswordStore::ReportMetricsImpl)); | 28 ScheduleTask(NewRunnableMethod(this, &PasswordStore::ReportMetricsImpl)); |
29 } | 29 } |
30 | 30 |
| 31 PasswordStore::~PasswordStore() {} |
| 32 |
31 void PasswordStore::AddLogin(const PasswordForm& form) { | 33 void PasswordStore::AddLogin(const PasswordForm& form) { |
32 ScheduleTask(NewRunnableMethod(this, &PasswordStore::AddLoginImpl, form)); | 34 ScheduleTask(NewRunnableMethod(this, &PasswordStore::AddLoginImpl, form)); |
33 } | 35 } |
34 | 36 |
35 void PasswordStore::UpdateLogin(const PasswordForm& form) { | 37 void PasswordStore::UpdateLogin(const PasswordForm& form) { |
36 ScheduleTask(NewRunnableMethod(this, &PasswordStore::UpdateLoginImpl, form)); | 38 ScheduleTask(NewRunnableMethod(this, &PasswordStore::UpdateLoginImpl, form)); |
37 } | 39 } |
38 | 40 |
39 void PasswordStore::RemoveLogin(const PasswordForm& form) { | 41 void PasswordStore::RemoveLogin(const PasswordForm& form) { |
40 ScheduleTask(NewRunnableMethod(this, &PasswordStore::RemoveLoginImpl, form)); | 42 ScheduleTask(NewRunnableMethod(this, &PasswordStore::RemoveLoginImpl, form)); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 114 |
113 void PasswordStore::CancelLoginsQuery(int handle) { | 115 void PasswordStore::CancelLoginsQuery(int handle) { |
114 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 116 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
115 pending_requests_.erase(handle); | 117 pending_requests_.erase(handle); |
116 } | 118 } |
117 | 119 |
118 PasswordStore::GetLoginsRequest::GetLoginsRequest( | 120 PasswordStore::GetLoginsRequest::GetLoginsRequest( |
119 PasswordStoreConsumer* consumer, int handle) | 121 PasswordStoreConsumer* consumer, int handle) |
120 : consumer(consumer), handle(handle), message_loop(MessageLoop::current()) { | 122 : consumer(consumer), handle(handle), message_loop(MessageLoop::current()) { |
121 } | 123 } |
OLD | NEW |