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

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

Issue 12853004: Move creation of WebDatabaseTable subclasses to WebDatabaseServiceFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix path snafu. 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(const base::FilePath& path,
66 : WebDataServiceBase(callback) { 66 const ProfileErrorCallback& callback)
67 : WebDataServiceBase(path, callback) {
67 } 68 }
68 69
69 // static 70 // static
70 void WebDataService::NotifyOfMultipleAutofillChanges( 71 void WebDataService::NotifyOfMultipleAutofillChanges(
71 WebDataService* web_data_service) { 72 WebDataService* web_data_service) {
72 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 73 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
73 74
74 if (!web_data_service) 75 if (!web_data_service)
75 return; 76 return;
76 77
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 256
256 void WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetween( 257 void WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetween(
257 const Time& delete_begin, 258 const Time& delete_begin,
258 const Time& delete_end) { 259 const Time& delete_end) {
259 wdbs_->ScheduleDBTask(FROM_HERE, Bind( 260 wdbs_->ScheduleDBTask(FROM_HERE, Bind(
260 &WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl, 261 &WebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl,
261 this, delete_begin, delete_end)); 262 this, delete_begin, delete_end));
262 } 263 }
263 264
264 WebDataService::WebDataService() 265 WebDataService::WebDataService()
265 : WebDataServiceBase(ProfileErrorCallback()) { 266 : WebDataServiceBase(base::FilePath(), ProfileErrorCallback()) {
266 } 267 }
267 268
268 WebDataService::~WebDataService() { 269 WebDataService::~WebDataService() {
269 } 270 }
270 271
271 //////////////////////////////////////////////////////////////////////////////// 272 ////////////////////////////////////////////////////////////////////////////////
272 // 273 //
273 // Keywords implementation. 274 // Keywords implementation.
274 // 275 //
275 //////////////////////////////////////////////////////////////////////////////// 276 ////////////////////////////////////////////////////////////////////////////////
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 653
653 void WebDataService::DestroyAutofillCreditCardResult( 654 void WebDataService::DestroyAutofillCreditCardResult(
654 const WDTypedResult* result) { 655 const WDTypedResult* result) {
655 DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT); 656 DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT);
656 const WDResult<std::vector<CreditCard*> >* r = 657 const WDResult<std::vector<CreditCard*> >* r =
657 static_cast<const WDResult<std::vector<CreditCard*> >*>(result); 658 static_cast<const WDResult<std::vector<CreditCard*> >*>(result);
658 659
659 std::vector<CreditCard*> credit_cards = r->GetValue(); 660 std::vector<CreditCard*> credit_cards = r->GetValue();
660 STLDeleteElements(&credit_cards); 661 STLDeleteElements(&credit_cards);
661 } 662 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698