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

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

Issue 12543034: Move creation of the various WebDatabaseTable types out of WebDatabase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows release builds (COMDAT folding combined static functions being used for keys. 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/autocomplete_syncable_service.cc
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.cc b/chrome/browser/webdata/autocomplete_syncable_service.cc
index f635e60c0a67eca042c5f954956c91017967f2b5..f039075cf83f2cfd69efb5373f1a1c92794ad1c5 100644
--- a/chrome/browser/webdata/autocomplete_syncable_service.cc
+++ b/chrome/browser/webdata/autocomplete_syncable_service.cc
@@ -299,8 +299,8 @@ void AutocompleteSyncableService::Observe(int type,
bool AutocompleteSyncableService::LoadAutofillData(
std::vector<AutofillEntry>* entries) const {
- return web_data_service_->GetDatabase()->
- GetAutofillTable()->GetAllAutofillEntries(entries);
+ return AutofillTable::FromWebDatabase(
+ web_data_service_->GetDatabase())->GetAllAutofillEntries(entries);
}
bool AutocompleteSyncableService::SaveChangesToWebData(
@@ -308,8 +308,9 @@ bool AutocompleteSyncableService::SaveChangesToWebData(
DCHECK(CalledOnValidThread());
if (!new_entries.empty() &&
- !web_data_service_->GetDatabase()->
- GetAutofillTable()->UpdateAutofillEntries(new_entries)) {
+ !AutofillTable::FromWebDatabase(
+ web_data_service_->GetDatabase())->UpdateAutofillEntries(
+ new_entries)) {
return false;
}
return true;
@@ -381,8 +382,9 @@ void AutocompleteSyncableService::WriteAutofillEntry(
syncer::SyncError AutocompleteSyncableService::AutofillEntryDelete(
const sync_pb::AutofillSpecifics& autofill) {
- if (!web_data_service_->GetDatabase()->GetAutofillTable()->RemoveFormElement(
- UTF8ToUTF16(autofill.name()), UTF8ToUTF16(autofill.value()))) {
+ if (!AutofillTable::FromWebDatabase(
+ web_data_service_->GetDatabase())->RemoveFormElement(
+ UTF8ToUTF16(autofill.name()), UTF8ToUTF16(autofill.value()))) {
return error_handler_->CreateAndUploadError(
FROM_HERE,
"Could not remove autocomplete entry from WebDatabase.");
@@ -400,8 +402,8 @@ void AutocompleteSyncableService::ActOnChanges(
case AutofillChange::ADD:
case AutofillChange::UPDATE: {
std::vector<base::Time> timestamps;
- if (!web_data_service_->GetDatabase()->
- GetAutofillTable()->GetAutofillTimestamps(
+ if (!AutofillTable::FromWebDatabase(
+ web_data_service_->GetDatabase())->GetAutofillTimestamps(
change->key().name(),
change->key().value(),
&timestamps)) {
« no previous file with comments | « chrome/browser/sync/test/integration/autofill_helper.cc ('k') | chrome/browser/webdata/autofill_profile_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698