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

Unified Diff: chrome/browser/webdata/autofill_web_data_service.cc

Issue 12937016: Rename AutofillWebDataServiceImpl --> AutofillWebDataService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove c/b/api/autofill_webdata_service.h 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/webdata/autofill_web_data_service.cc
diff --git a/chrome/browser/webdata/autofill_web_data_service_impl.cc b/chrome/browser/webdata/autofill_web_data_service.cc
similarity index 80%
rename from chrome/browser/webdata/autofill_web_data_service_impl.cc
rename to chrome/browser/webdata/autofill_web_data_service.cc
index 9bc77403b84739cf9752aeed0f6322348a03e365..9a91a5844d5e0a831920c2fedd45f6419a86383d 100644
--- a/chrome/browser/webdata/autofill_web_data_service_impl.cc
+++ b/chrome/browser/webdata/autofill_web_data_service.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/webdata/autofill_web_data_service_impl.h"
+#include "chrome/browser/webdata/autofill_web_data_service.h"
#include "base/logging.h"
#include "base/stl_util.h"
@@ -63,109 +63,103 @@ AutofillWebDataService::AutofillWebDataService()
WebDataServiceBase::ProfileErrorCallback()) {
}
-AutofillWebDataServiceImpl::AutofillWebDataServiceImpl(
- scoped_refptr<WebDatabaseService> wdbs,
- const ProfileErrorCallback& callback)
- : AutofillWebDataService(wdbs, callback) {
-}
-
content::NotificationSource
-AutofillWebDataServiceImpl::GetNotificationSource() {
+AutofillWebDataService::GetNotificationSource() {
return content::Source<AutofillWebDataService>(this);
}
-void AutofillWebDataServiceImpl::AddFormFields(
+void AutofillWebDataService::AddFormFields(
const std::vector<FormFieldData>& fields) {
wdbs_->ScheduleDBTask(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::AddFormElementsImpl, this, fields));
+ Bind(&AutofillWebDataService::AddFormElementsImpl, this, fields));
}
WebDataServiceBase::Handle
-AutofillWebDataServiceImpl::GetFormValuesForElementName(
+AutofillWebDataService::GetFormValuesForElementName(
const string16& name, const string16& prefix, int limit,
WebDataServiceConsumer* consumer) {
return wdbs_->ScheduleDBTaskWithResult(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::GetFormValuesForElementNameImpl,
+ Bind(&AutofillWebDataService::GetFormValuesForElementNameImpl,
this, name, prefix, limit), consumer);
}
-void AutofillWebDataServiceImpl::RemoveExpiredFormElements() {
+void AutofillWebDataService::RemoveExpiredFormElements() {
wdbs_->ScheduleDBTask(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::RemoveExpiredFormElementsImpl, this));
+ Bind(&AutofillWebDataService::RemoveExpiredFormElementsImpl, this));
}
-void AutofillWebDataServiceImpl::RemoveFormValueForElementName(
+void AutofillWebDataService::RemoveFormValueForElementName(
const string16& name, const string16& value) {
wdbs_->ScheduleDBTask(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::RemoveFormValueForElementNameImpl,
+ Bind(&AutofillWebDataService::RemoveFormValueForElementNameImpl,
this, name, value));
}
-void AutofillWebDataServiceImpl::AddAutofillProfile(
+void AutofillWebDataService::AddAutofillProfile(
const AutofillProfile& profile) {
wdbs_->ScheduleDBTask(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::AddAutofillProfileImpl, this, profile));
+ Bind(&AutofillWebDataService::AddAutofillProfileImpl, this, profile));
}
-void AutofillWebDataServiceImpl::UpdateAutofillProfile(
+void AutofillWebDataService::UpdateAutofillProfile(
const AutofillProfile& profile) {
wdbs_->ScheduleDBTask(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::UpdateAutofillProfileImpl,
+ Bind(&AutofillWebDataService::UpdateAutofillProfileImpl,
this, profile));
}
-void AutofillWebDataServiceImpl::RemoveAutofillProfile(
+void AutofillWebDataService::RemoveAutofillProfile(
const std::string& guid) {
wdbs_->ScheduleDBTask(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::RemoveAutofillProfileImpl, this, guid));
+ Bind(&AutofillWebDataService::RemoveAutofillProfileImpl, this, guid));
}
-WebDataServiceBase::Handle AutofillWebDataServiceImpl::GetAutofillProfiles(
+WebDataServiceBase::Handle AutofillWebDataService::GetAutofillProfiles(
WebDataServiceConsumer* consumer) {
return wdbs_->ScheduleDBTaskWithResult(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::GetAutofillProfilesImpl, this),
+ Bind(&AutofillWebDataService::GetAutofillProfilesImpl, this),
consumer);
}
-void AutofillWebDataServiceImpl::AddCreditCard(const CreditCard& credit_card) {
+void AutofillWebDataService::AddCreditCard(const CreditCard& credit_card) {
wdbs_->ScheduleDBTask(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::AddCreditCardImpl, this, credit_card));
+ Bind(&AutofillWebDataService::AddCreditCardImpl, this, credit_card));
}
-void AutofillWebDataServiceImpl::UpdateCreditCard(
+void AutofillWebDataService::UpdateCreditCard(
const CreditCard& credit_card) {
wdbs_->ScheduleDBTask(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::UpdateCreditCardImpl, this,
+ Bind(&AutofillWebDataService::UpdateCreditCardImpl, this,
credit_card));
}
-void AutofillWebDataServiceImpl::RemoveCreditCard(const std::string& guid) {
+void AutofillWebDataService::RemoveCreditCard(const std::string& guid) {
wdbs_->ScheduleDBTask(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::RemoveCreditCardImpl, this, guid));
+ Bind(&AutofillWebDataService::RemoveCreditCardImpl, this, guid));
}
-AutofillWebDataServiceImpl::Handle AutofillWebDataServiceImpl::GetCreditCards(
+WebDataServiceBase::Handle AutofillWebDataService::GetCreditCards(
WebDataServiceConsumer* consumer) {
return wdbs_->ScheduleDBTaskWithResult(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::GetCreditCardsImpl, this), consumer);
+ Bind(&AutofillWebDataService::GetCreditCardsImpl, this), consumer);
}
-void AutofillWebDataServiceImpl::RemoveFormElementsAddedBetween(
+void AutofillWebDataService::RemoveFormElementsAddedBetween(
const Time& delete_begin, const Time& delete_end) {
wdbs_->ScheduleDBTask(FROM_HERE,
- Bind(&AutofillWebDataServiceImpl::RemoveFormElementsAddedBetweenImpl,
+ Bind(&AutofillWebDataService::RemoveFormElementsAddedBetweenImpl,
this, delete_begin, delete_end));
}
void
-AutofillWebDataServiceImpl::RemoveAutofillProfilesAndCreditCardsModifiedBetween(
+AutofillWebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetween(
const Time& delete_begin, const Time& delete_end) {
wdbs_->ScheduleDBTask(FROM_HERE, Bind(
-&AutofillWebDataServiceImpl::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl,
+&AutofillWebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl,
this, delete_begin, delete_end));
}
-AutofillWebDataServiceImpl::~AutofillWebDataServiceImpl() {
+AutofillWebDataService::~AutofillWebDataService() {
}
////////////////////////////////////////////////////////////////////////////////
@@ -174,7 +168,7 @@ AutofillWebDataServiceImpl::~AutofillWebDataServiceImpl() {
//
////////////////////////////////////////////////////////////////////////////////
-WebDatabase::State AutofillWebDataServiceImpl::AddFormElementsImpl(
+WebDatabase::State AutofillWebDataService::AddFormElementsImpl(
const std::vector<FormFieldData>& fields, WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
AutofillChangeList changes;
@@ -196,7 +190,7 @@ WebDatabase::State AutofillWebDataServiceImpl::AddFormElementsImpl(
}
scoped_ptr<WDTypedResult>
-AutofillWebDataServiceImpl::GetFormValuesForElementNameImpl(
+AutofillWebDataService::GetFormValuesForElementNameImpl(
const string16& name, const string16& prefix, int limit, WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
std::vector<string16> values;
@@ -207,7 +201,7 @@ AutofillWebDataServiceImpl::GetFormValuesForElementNameImpl(
}
WebDatabase::State
-AutofillWebDataServiceImpl::RemoveFormElementsAddedBetweenImpl(
+AutofillWebDataService::RemoveFormElementsAddedBetweenImpl(
const base::Time& delete_begin, const base::Time& delete_end,
WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
@@ -230,7 +224,7 @@ AutofillWebDataServiceImpl::RemoveFormElementsAddedBetweenImpl(
}
WebDatabase::State
-AutofillWebDataServiceImpl::RemoveExpiredFormElementsImpl(
+AutofillWebDataService::RemoveExpiredFormElementsImpl(
WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
AutofillChangeList changes;
@@ -251,7 +245,7 @@ AutofillWebDataServiceImpl::RemoveExpiredFormElementsImpl(
}
WebDatabase::State
-AutofillWebDataServiceImpl::RemoveFormValueForElementNameImpl(
+AutofillWebDataService::RemoveFormValueForElementNameImpl(
const string16& name, const string16& value, WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
@@ -272,7 +266,7 @@ AutofillWebDataServiceImpl::RemoveFormValueForElementNameImpl(
}
WebDatabase::State
-AutofillWebDataServiceImpl::AddAutofillProfileImpl(
+AutofillWebDataService::AddAutofillProfileImpl(
const AutofillProfile& profile, WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
if (!AutofillTable::FromWebDatabase(db)->AddAutofillProfile(profile)) {
@@ -292,7 +286,7 @@ AutofillWebDataServiceImpl::AddAutofillProfileImpl(
}
WebDatabase::State
-AutofillWebDataServiceImpl::UpdateAutofillProfileImpl(
+AutofillWebDataService::UpdateAutofillProfileImpl(
const AutofillProfile& profile, WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
// Only perform the update if the profile exists. It is currently
@@ -323,7 +317,7 @@ AutofillWebDataServiceImpl::UpdateAutofillProfileImpl(
}
WebDatabase::State
-AutofillWebDataServiceImpl::RemoveAutofillProfileImpl(
+AutofillWebDataService::RemoveAutofillProfileImpl(
kaiwang 2013/03/25 23:21:25 one line? Also applies to functions below
Cait (Slow) 2013/03/26 14:55:03 Done.
const std::string& guid, WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
AutofillProfile* profile = NULL;
@@ -349,7 +343,7 @@ AutofillWebDataServiceImpl::RemoveAutofillProfileImpl(
}
scoped_ptr<WDTypedResult>
-AutofillWebDataServiceImpl::GetAutofillProfilesImpl(
+AutofillWebDataService::GetAutofillProfilesImpl(
WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
std::vector<AutofillProfile*> profiles;
@@ -358,12 +352,12 @@ AutofillWebDataServiceImpl::GetAutofillProfilesImpl(
new WDDestroyableResult<std::vector<AutofillProfile*> >(
AUTOFILL_PROFILES_RESULT,
profiles,
- base::Bind(&AutofillWebDataServiceImpl::DestroyAutofillProfileResult,
+ base::Bind(&AutofillWebDataService::DestroyAutofillProfileResult,
base::Unretained(this))));
}
WebDatabase::State
-AutofillWebDataServiceImpl::AddCreditCardImpl(
+AutofillWebDataService::AddCreditCardImpl(
const CreditCard& credit_card, WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
if (!AutofillTable::FromWebDatabase(db)->AddCreditCard(credit_card)) {
@@ -375,7 +369,7 @@ AutofillWebDataServiceImpl::AddCreditCardImpl(
}
WebDatabase::State
-AutofillWebDataServiceImpl::UpdateCreditCardImpl(
+AutofillWebDataService::UpdateCreditCardImpl(
const CreditCard& credit_card, WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
// It is currently valid to try to update a missing profile. We simply drop
@@ -395,7 +389,7 @@ AutofillWebDataServiceImpl::UpdateCreditCardImpl(
}
WebDatabase::State
-AutofillWebDataServiceImpl::RemoveCreditCardImpl(
+AutofillWebDataService::RemoveCreditCardImpl(
const std::string& guid, WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
if (!AutofillTable::FromWebDatabase(db)->RemoveCreditCard(guid)) {
@@ -406,7 +400,7 @@ AutofillWebDataServiceImpl::RemoveCreditCardImpl(
}
scoped_ptr<WDTypedResult>
-AutofillWebDataServiceImpl::GetCreditCardsImpl(WebDatabase* db) {
+AutofillWebDataService::GetCreditCardsImpl(WebDatabase* db) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
std::vector<CreditCard*> credit_cards;
AutofillTable::FromWebDatabase(db)->GetCreditCards(&credit_cards);
@@ -414,12 +408,12 @@ AutofillWebDataServiceImpl::GetCreditCardsImpl(WebDatabase* db) {
new WDDestroyableResult<std::vector<CreditCard*> >(
AUTOFILL_CREDITCARDS_RESULT,
credit_cards,
- base::Bind(&AutofillWebDataServiceImpl::DestroyAutofillCreditCardResult,
+ base::Bind(&AutofillWebDataService::DestroyAutofillCreditCardResult,
base::Unretained(this))));
}
WebDatabase::State
-AutofillWebDataServiceImpl::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl(
+AutofillWebDataService::RemoveAutofillProfilesAndCreditCardsModifiedBetweenImpl(
const base::Time& delete_begin, const base::Time& delete_end,
WebDatabase* db) {
std::vector<std::string> profile_guids;
@@ -446,7 +440,7 @@ AutofillWebDataServiceImpl::RemoveAutofillProfilesAndCreditCardsModifiedBetweenI
return WebDatabase::COMMIT_NOT_NEEDED;
}
-void AutofillWebDataServiceImpl::DestroyAutofillProfileResult(
+void AutofillWebDataService::DestroyAutofillProfileResult(
const WDTypedResult* result) {
DCHECK(result->GetType() == AUTOFILL_PROFILES_RESULT);
const WDResult<std::vector<AutofillProfile*> >* r =
@@ -455,7 +449,7 @@ void AutofillWebDataServiceImpl::DestroyAutofillProfileResult(
STLDeleteElements(&profiles);
}
-void AutofillWebDataServiceImpl::DestroyAutofillCreditCardResult(
+void AutofillWebDataService::DestroyAutofillCreditCardResult(
const WDTypedResult* result) {
DCHECK(result->GetType() == AUTOFILL_CREDITCARDS_RESULT);
const WDResult<std::vector<CreditCard*> >* r =
« no previous file with comments | « chrome/browser/webdata/autofill_web_data_service.h ('k') | chrome/browser/webdata/autofill_web_data_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698