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

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

Issue 12780012: Move UI dependency from WebDataService to WebDataServiceFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 "chrome/browser/search_engines/template_url.h" 7 #include "chrome/browser/search_engines/template_url.h"
8 #include "chrome/browser/webdata/autocomplete_syncable_service.h" 8 #include "chrome/browser/webdata/autocomplete_syncable_service.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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 WDAppImagesResult::~WDAppImagesResult() {} 57 WDAppImagesResult::~WDAppImagesResult() {}
58 58
59 WDKeywordsResult::WDKeywordsResult() 59 WDKeywordsResult::WDKeywordsResult()
60 : default_search_provider_id(0), 60 : default_search_provider_id(0),
61 builtin_keyword_version(0) { 61 builtin_keyword_version(0) {
62 } 62 }
63 63
64 WDKeywordsResult::~WDKeywordsResult() {} 64 WDKeywordsResult::~WDKeywordsResult() {}
65 65
66 WebDataService::WebDataService() 66 WebDataService::WebDataService(const ProfileErrorCallback& callback)
67 : autocomplete_syncable_service_(NULL), 67 : WebDataServiceBase(callback),
68 autocomplete_syncable_service_(NULL),
68 autofill_profile_syncable_service_(NULL) { 69 autofill_profile_syncable_service_(NULL) {
69 } 70 }
70 71
71 // static 72 // static
72 void WebDataService::NotifyOfMultipleAutofillChanges( 73 void WebDataService::NotifyOfMultipleAutofillChanges(
73 WebDataService* web_data_service) { 74 WebDataService* web_data_service) {
74 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 75 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
75 76
76 if (!web_data_service) 77 if (!web_data_service)
77 return; 78 return;
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 705
705 void WebDataService::DestroyAutofillCreditCardResult( 706 void WebDataService::DestroyAutofillCreditCardResult(
706 const WDTypedResult* result) { 707 const WDTypedResult* result) {
707 DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT); 708 DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT);
708 const WDResult<std::vector<CreditCard*> >* r = 709 const WDResult<std::vector<CreditCard*> >* r =
709 static_cast<const WDResult<std::vector<CreditCard*> >*>(result); 710 static_cast<const WDResult<std::vector<CreditCard*> >*>(result);
710 711
711 std::vector<CreditCard*> credit_cards = r->GetValue(); 712 std::vector<CreditCard*> credit_cards = r->GetValue();
712 STLDeleteElements(&credit_cards); 713 STLDeleteElements(&credit_cards);
713 } 714 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698