| 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 "chrome/browser/password_manager/password_store_win.h" | 5 #include "chrome/browser/password_manager/password_store_win.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 return; | 153 return; |
| 154 } | 154 } |
| 155 | 155 |
| 156 DCHECK_EQ(PASSWORD_IE7_RESULT, result->GetType()); | 156 DCHECK_EQ(PASSWORD_IE7_RESULT, result->GetType()); |
| 157 std::vector<autofill::PasswordForm*> matched_forms = | 157 std::vector<autofill::PasswordForm*> matched_forms = |
| 158 GetIE7Results(result, *form); | 158 GetIE7Results(result, *form); |
| 159 | 159 |
| 160 callback_runner.Run(matched_forms); | 160 callback_runner.Run(matched_forms); |
| 161 } | 161 } |
| 162 | 162 |
| 163 PasswordStoreWin::PasswordStoreWin(LoginDatabase* login_database, | 163 PasswordStoreWin::PasswordStoreWin( |
| 164 Profile* profile, | 164 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, |
| 165 WebDataService* web_data_service) | 165 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, |
| 166 : PasswordStoreDefault(login_database, profile) { | 166 LoginDatabase* login_database, |
| 167 Profile* profile, |
| 168 WebDataService* web_data_service) |
| 169 : PasswordStoreDefault(main_thread_runner, |
| 170 db_thread_runner, |
| 171 login_database, |
| 172 profile) { |
| 167 db_handler_.reset(new DBHandler(web_data_service, this)); | 173 db_handler_.reset(new DBHandler(web_data_service, this)); |
| 168 } | 174 } |
| 169 | 175 |
| 170 PasswordStoreWin::~PasswordStoreWin() { | 176 PasswordStoreWin::~PasswordStoreWin() { |
| 171 } | 177 } |
| 172 | 178 |
| 173 void PasswordStoreWin::ShutdownOnDBThread() { | 179 void PasswordStoreWin::ShutdownOnDBThread() { |
| 174 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 180 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); |
| 175 db_handler_.reset(); | 181 db_handler_.reset(); |
| 176 } | 182 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 197 | 203 |
| 198 void PasswordStoreWin::GetLoginsImpl( | 204 void PasswordStoreWin::GetLoginsImpl( |
| 199 const PasswordForm& form, | 205 const PasswordForm& form, |
| 200 AuthorizationPromptPolicy prompt_policy, | 206 AuthorizationPromptPolicy prompt_policy, |
| 201 const ConsumerCallbackRunner& callback_runner) { | 207 const ConsumerCallbackRunner& callback_runner) { |
| 202 ConsumerCallbackRunner get_ie7_login = | 208 ConsumerCallbackRunner get_ie7_login = |
| 203 base::Bind(&PasswordStoreWin::GetIE7LoginIfNecessary, | 209 base::Bind(&PasswordStoreWin::GetIE7LoginIfNecessary, |
| 204 this, form, callback_runner); | 210 this, form, callback_runner); |
| 205 PasswordStoreDefault::GetLoginsImpl(form, prompt_policy, get_ie7_login); | 211 PasswordStoreDefault::GetLoginsImpl(form, prompt_policy, get_ie7_login); |
| 206 } | 212 } |
| OLD | NEW |