| 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/webdata/web_data_service.h" | 5 #include "chrome/browser/webdata/web_data_service.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chrome/browser/password_manager/ie7_password.h" | 8 #include "chrome/browser/password_manager/ie7_password.h" |
| 9 #include "chrome/browser/webdata/logins_table.h" | 9 #include "chrome/browser/webdata/logins_table.h" |
| 10 #include "chrome/browser/webdata/web_database_service.h" | 10 #include "components/webdata/common/web_database_service.h" |
| 11 | 11 |
| 12 using base::Bind; | 12 using base::Bind; |
| 13 | 13 |
| 14 void WebDataService::AddIE7Login(const IE7PasswordInfo& info) { | 14 void WebDataService::AddIE7Login(const IE7PasswordInfo& info) { |
| 15 wdbs_->ScheduleDBTask( | 15 wdbs_->ScheduleDBTask( |
| 16 FROM_HERE, Bind(&WebDataService::AddIE7LoginImpl, this, info)); | 16 FROM_HERE, Bind(&WebDataService::AddIE7LoginImpl, this, info)); |
| 17 } | 17 } |
| 18 | 18 |
| 19 void WebDataService::RemoveIE7Login(const IE7PasswordInfo& info) { | 19 void WebDataService::RemoveIE7Login(const IE7PasswordInfo& info) { |
| 20 wdbs_->ScheduleDBTask( | 20 wdbs_->ScheduleDBTask( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 42 return WebDatabase::COMMIT_NOT_NEEDED; | 42 return WebDatabase::COMMIT_NOT_NEEDED; |
| 43 } | 43 } |
| 44 | 44 |
| 45 scoped_ptr<WDTypedResult> WebDataService::GetIE7LoginImpl( | 45 scoped_ptr<WDTypedResult> WebDataService::GetIE7LoginImpl( |
| 46 const IE7PasswordInfo& info, WebDatabase* db) { | 46 const IE7PasswordInfo& info, WebDatabase* db) { |
| 47 IE7PasswordInfo result; | 47 IE7PasswordInfo result; |
| 48 LoginsTable::FromWebDatabase(db)->GetIE7Login(info, &result); | 48 LoginsTable::FromWebDatabase(db)->GetIE7Login(info, &result); |
| 49 return scoped_ptr<WDTypedResult>( | 49 return scoped_ptr<WDTypedResult>( |
| 50 new WDResult<IE7PasswordInfo>(PASSWORD_IE7_RESULT, result)); | 50 new WDResult<IE7PasswordInfo>(PASSWORD_IE7_RESULT, result)); |
| 51 } | 51 } |
| OLD | NEW |