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/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/task.h" | 10 #include "base/task.h" |
11 #include "chrome/browser/password_manager/password_store_consumer.h" | 11 #include "chrome/browser/password_manager/password_store_consumer.h" |
12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 #include "webkit/glue/password_form.h" | 13 #include "webkit/forms/password_form.h" |
14 | 14 |
15 using content::BrowserThread; | 15 using content::BrowserThread; |
16 using std::vector; | 16 using std::vector; |
17 using webkit_glue::PasswordForm; | 17 using webkit::forms::PasswordForm; |
18 | 18 |
19 PasswordStore::GetLoginsRequest::GetLoginsRequest(GetLoginsCallback* callback) | 19 PasswordStore::GetLoginsRequest::GetLoginsRequest(GetLoginsCallback* callback) |
20 : CancelableRequest1<GetLoginsCallback, | 20 : CancelableRequest1<GetLoginsCallback, |
21 std::vector<webkit_glue::PasswordForm*> >(callback) { | 21 std::vector<webkit::forms::PasswordForm*> >(callback) { |
22 } | 22 } |
23 | 23 |
24 PasswordStore::GetLoginsRequest::~GetLoginsRequest() { | 24 PasswordStore::GetLoginsRequest::~GetLoginsRequest() { |
25 if (canceled()) { | 25 if (canceled()) { |
26 STLDeleteElements(&value); | 26 STLDeleteElements(&value); |
27 } | 27 } |
28 } | 28 } |
29 | 29 |
30 PasswordStore::PasswordStore() { | 30 PasswordStore::PasswordStore() { |
31 } | 31 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 BrowserThread::PostTask( | 146 BrowserThread::PostTask( |
147 BrowserThread::UI, FROM_HERE, | 147 BrowserThread::UI, FROM_HERE, |
148 base::Bind(&PasswordStore::NotifyLoginsChanged, this)); | 148 base::Bind(&PasswordStore::NotifyLoginsChanged, this)); |
149 } | 149 } |
150 | 150 |
151 void PasswordStore::NotifyLoginsChanged() { | 151 void PasswordStore::NotifyLoginsChanged() { |
152 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 152 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
153 FOR_EACH_OBSERVER(Observer, observers_, OnLoginsChanged()); | 153 FOR_EACH_OBSERVER(Observer, observers_, OnLoginsChanged()); |
154 } | 154 } |
OLD | NEW |