Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: chrome/browser/webdata/web_data_service_win.cc

Issue 364343002: Kill WebDataService, move (WIN only) Password code into separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments and clean up Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/webdata/web_data_service_factory.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/webdata/web_data_service.h"
6
7 #include "base/bind.h"
8 #include "chrome/browser/webdata/logins_table.h"
9 #include "components/os_crypt/ie7_password_win.h"
10 #include "components/webdata/common/web_database_service.h"
11
12 using base::Bind;
13
14 void WebDataService::AddIE7Login(const IE7PasswordInfo& info) {
15 wdbs_->ScheduleDBTask(
16 FROM_HERE, Bind(&WebDataService::AddIE7LoginImpl, this, info));
17 }
18
19 void WebDataService::RemoveIE7Login(const IE7PasswordInfo& info) {
20 wdbs_->ScheduleDBTask(
21 FROM_HERE, Bind(&WebDataService::RemoveIE7LoginImpl, this, info));
22 }
23
24 WebDataService::Handle WebDataService::GetIE7Login(
25 const IE7PasswordInfo& info,
26 WebDataServiceConsumer* consumer) {
27 return wdbs_->ScheduleDBTaskWithResult(
28 FROM_HERE, Bind(&WebDataService::GetIE7LoginImpl, this, info), consumer);
29 }
30
31 WebDatabase::State WebDataService::AddIE7LoginImpl(
32 const IE7PasswordInfo& info, WebDatabase* db) {
33 if (LoginsTable::FromWebDatabase(db)->AddIE7Login(info))
34 return WebDatabase::COMMIT_NEEDED;
35 return WebDatabase::COMMIT_NOT_NEEDED;
36 }
37
38 WebDatabase::State WebDataService::RemoveIE7LoginImpl(
39 const IE7PasswordInfo& info, WebDatabase* db) {
40 if (LoginsTable::FromWebDatabase(db)->RemoveIE7Login(info))
41 return WebDatabase::COMMIT_NEEDED;
42 return WebDatabase::COMMIT_NOT_NEEDED;
43 }
44
45 scoped_ptr<WDTypedResult> WebDataService::GetIE7LoginImpl(
46 const IE7PasswordInfo& info, WebDatabase* db) {
47 IE7PasswordInfo result;
48 LoginsTable::FromWebDatabase(db)->GetIE7Login(info, &result);
49 return scoped_ptr<WDTypedResult>(
50 new WDResult<IE7PasswordInfo>(PASSWORD_IE7_RESULT, result));
51 }
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_data_service_factory.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698