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

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

Issue 12695015: Split Autofill webdata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert all Autofill/Sync clients of WDS to using AutofillWDS Created 7 years, 9 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
OLDNEW
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/webdata/web_data_service.h" 5 #include "chrome/browser/webdata/web_data_service.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/browser/search_engines/template_url.h" 8 #include "chrome/browser/search_engines/template_url.h"
9 #include "chrome/browser/webdata/autofill_change.h" 9 #include "chrome/browser/webdata/autofill_change.h"
10 #include "chrome/browser/webdata/autofill_entry.h" 10 #include "chrome/browser/webdata/autofill_entry.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 WDAppImagesResult::~WDAppImagesResult() {} 56 WDAppImagesResult::~WDAppImagesResult() {}
57 57
58 WDKeywordsResult::WDKeywordsResult() 58 WDKeywordsResult::WDKeywordsResult()
59 : default_search_provider_id(0), 59 : default_search_provider_id(0),
60 builtin_keyword_version(0) { 60 builtin_keyword_version(0) {
61 } 61 }
62 62
63 WDKeywordsResult::~WDKeywordsResult() {} 63 WDKeywordsResult::~WDKeywordsResult() {}
64 64
65 WebDataService::WebDataService(const ProfileErrorCallback& callback) 65 WebDataService::WebDataService(
66 : WebDataServiceBase(callback) { 66 scoped_refptr<WebDatabaseService> wdbs,
67 const ProfileErrorCallback& callback)
68 : WebDataServiceBase(wdbs, callback) {
67 } 69 }
68 70
69 // static 71 // static
70 void WebDataService::NotifyOfMultipleAutofillChanges( 72 void WebDataService::NotifyOfMultipleAutofillChanges(
71 WebDataService* web_data_service) { 73 WebDataService* web_data_service) {
72 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 74 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
73 75
74 if (!web_data_service) 76 if (!web_data_service)
75 return; 77 return;
76 78
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 257
256 void WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetween( 258 void WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetween(
257 const Time& delete_begin, 259 const Time& delete_begin,
258 const Time& delete_end) { 260 const Time& delete_end) {
259 wdbs_->ScheduleDBTask(FROM_HERE, Bind( 261 wdbs_->ScheduleDBTask(FROM_HERE, Bind(
260 &WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl, 262 &WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl,
261 this, delete_begin, delete_end)); 263 this, delete_begin, delete_end));
262 } 264 }
263 265
264 WebDataService::WebDataService() 266 WebDataService::WebDataService()
265 : WebDataServiceBase(ProfileErrorCallback()) { 267 : WebDataServiceBase(NULL, ProfileErrorCallback()) {
266 } 268 }
267 269
268 WebDataService::~WebDataService() { 270 WebDataService::~WebDataService() {
269 } 271 }
270 272
271 //////////////////////////////////////////////////////////////////////////////// 273 ////////////////////////////////////////////////////////////////////////////////
272 // 274 //
273 // Keywords implementation. 275 // Keywords implementation.
274 // 276 //
275 //////////////////////////////////////////////////////////////////////////////// 277 ////////////////////////////////////////////////////////////////////////////////
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 654
653 void WebDataService::DestroyAutofillCreditCardResult( 655 void WebDataService::DestroyAutofillCreditCardResult(
654 const WDTypedResult* result) { 656 const WDTypedResult* result) {
655 DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT); 657 DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT);
656 const WDResult<std::vector<CreditCard*> >* r = 658 const WDResult<std::vector<CreditCard*> >* r =
657 static_cast<const WDResult<std::vector<CreditCard*> >*>(result); 659 static_cast<const WDResult<std::vector<CreditCard*> >*>(result);
658 660
659 std::vector<CreditCard*> credit_cards = r->GetValue(); 661 std::vector<CreditCard*> credit_cards = r->GetValue();
660 STLDeleteElements(&credit_cards); 662 STLDeleteElements(&credit_cards);
661 } 663 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698