OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <windows.h> | 5 #include <windows.h> |
| 6 #include <wincrypt.h> |
6 #include <string> | 7 #include <string> |
7 #include <vector> | 8 #include <vector> |
8 #include <wincrypt.h> | |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 12 #include "base/files/scoped_temp_dir.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
14 #include "base/scoped_temp_dir.h" | |
15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
16 #include "base/synchronization/waitable_event.h" | 16 #include "base/synchronization/waitable_event.h" |
17 #include "base/time.h" | 17 #include "base/time.h" |
18 #include "chrome/browser/password_manager/ie7_password.h" | 18 #include "chrome/browser/password_manager/ie7_password.h" |
19 #include "chrome/browser/password_manager/password_form_data.h" | 19 #include "chrome/browser/password_manager/password_form_data.h" |
20 #include "chrome/browser/password_manager/password_store_consumer.h" | 20 #include "chrome/browser/password_manager/password_store_consumer.h" |
21 #include "chrome/browser/password_manager/password_store_win.h" | 21 #include "chrome/browser/password_manager/password_store_win.h" |
22 #include "chrome/browser/prefs/pref_service.h" | 22 #include "chrome/browser/prefs/pref_service.h" |
23 #include "chrome/browser/webdata/web_data_service.h" | 23 #include "chrome/browser/webdata/web_data_service.h" |
24 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 MessageLoopForUI message_loop_; | 134 MessageLoopForUI message_loop_; |
135 content::TestBrowserThread ui_thread_; | 135 content::TestBrowserThread ui_thread_; |
136 // PasswordStore, WDS schedule work on this thread. | 136 // PasswordStore, WDS schedule work on this thread. |
137 content::TestBrowserThread db_thread_; | 137 content::TestBrowserThread db_thread_; |
138 | 138 |
139 scoped_ptr<LoginDatabase> login_db_; | 139 scoped_ptr<LoginDatabase> login_db_; |
140 scoped_ptr<TestingProfile> profile_; | 140 scoped_ptr<TestingProfile> profile_; |
141 scoped_refptr<WebDataService> wds_; | 141 scoped_refptr<WebDataService> wds_; |
142 scoped_refptr<PasswordStore> store_; | 142 scoped_refptr<PasswordStore> store_; |
143 ScopedTempDir temp_dir_; | 143 base::ScopedTempDir temp_dir_; |
144 }; | 144 }; |
145 | 145 |
146 ACTION(STLDeleteElements0) { | 146 ACTION(STLDeleteElements0) { |
147 STLDeleteContainerPointers(arg0.begin(), arg0.end()); | 147 STLDeleteContainerPointers(arg0.begin(), arg0.end()); |
148 } | 148 } |
149 | 149 |
150 ACTION(QuitUIMessageLoop) { | 150 ACTION(QuitUIMessageLoop) { |
151 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 151 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
152 MessageLoop::current()->Quit(); | 152 MessageLoop::current()->Quit(); |
153 } | 153 } |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 | 406 |
407 VectorOfForms expect_none; | 407 VectorOfForms expect_none; |
408 // expect that we get no results; | 408 // expect that we get no results; |
409 EXPECT_CALL(consumer, OnPasswordStoreRequestDone( | 409 EXPECT_CALL(consumer, OnPasswordStoreRequestDone( |
410 _, ContainsAllPasswordForms(expect_none))) | 410 _, ContainsAllPasswordForms(expect_none))) |
411 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop())); | 411 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop())); |
412 | 412 |
413 store_->GetAutofillableLogins(&consumer); | 413 store_->GetAutofillableLogins(&consumer); |
414 MessageLoop::current()->Run(); | 414 MessageLoop::current()->Run(); |
415 } | 415 } |
OLD | NEW |