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

Unified Diff: chrome/browser/webdata/autofill_profile_syncable_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/webdata/autofill_profile_syncable_service.cc
diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.cc b/chrome/browser/webdata/autofill_profile_syncable_service.cc
index 38ffcd5c9e7349f73d3c51908e44855112a6b23c..1907ac447a89ddb281b36a0afe0ca586913b65c4 100644
--- a/chrome/browser/webdata/autofill_profile_syncable_service.cc
+++ b/chrome/browser/webdata/autofill_profile_syncable_service.cc
@@ -8,9 +8,9 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/api/webdata/autofill_web_data_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/webdata/autofill_table.h"
-#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/browser/webdata/web_database.h"
#include "chrome/common/chrome_notification_types.h"
#include "components/autofill/browser/autofill_profile.h"
@@ -43,14 +43,14 @@ void* UserDataKey() {
const char kAutofillProfileTag[] = "google_chrome_autofill_profiles";
AutofillProfileSyncableService::AutofillProfileSyncableService(
- WebDataService* web_data_service)
+ AutofillWebDataService* web_data_service)
: web_data_service_(web_data_service) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
DCHECK(web_data_service_);
notification_registrar_.Add(
this,
chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED,
- content::Source<WebDataService>(web_data_service_));
+ content::Source<AutofillWebDataService>(web_data_service_));
}
AutofillProfileSyncableService::~AutofillProfileSyncableService() {
@@ -59,7 +59,7 @@ AutofillProfileSyncableService::~AutofillProfileSyncableService() {
// static
void AutofillProfileSyncableService::CreateForWebDataService(
- WebDataService* web_data) {
+ AutofillWebDataService* web_data) {
web_data->GetDBUserData()->SetUserData(
UserDataKey(), new AutofillProfileSyncableService(web_data));
}
@@ -67,7 +67,7 @@ void AutofillProfileSyncableService::CreateForWebDataService(
// static
AutofillProfileSyncableService*
AutofillProfileSyncableService::FromWebDataService(
- WebDataService* service) {
+ AutofillWebDataService* service) {
return static_cast<AutofillProfileSyncableService*>(
service->GetDBUserData()->GetUserData(UserDataKey()));
}
@@ -182,7 +182,7 @@ AutofillProfileSyncableService::MergeDataAndStartSyncing(
sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes));
}
- WebDataService::NotifyOfMultipleAutofillChanges(web_data_service_);
+ AutofillWebDataService::NotifyOfMultipleAutofillChanges(web_data_service_);
return merge_result;
}
@@ -253,7 +253,7 @@ syncer::SyncError AutofillProfileSyncableService::ProcessSyncChanges(
"Failed to update webdata.");
}
- WebDataService::NotifyOfMultipleAutofillChanges(web_data_service_);
+ AutofillWebDataService::NotifyOfMultipleAutofillChanges(web_data_service_);
return syncer::SyncError();
}
@@ -262,7 +262,8 @@ void AutofillProfileSyncableService::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
DCHECK_EQ(type, chrome::NOTIFICATION_AUTOFILL_PROFILE_CHANGED);
- DCHECK_EQ(web_data_service_, content::Source<WebDataService>(source).ptr());
+ DCHECK_EQ(web_data_service_,
+ content::Source<AutofillWebDataService>(source).ptr());
// Check if sync is on. If we receive notification prior to the sync being set
// up we are going to process all when MergeData..() is called. If we receive
// notification after the sync exited, it will be sinced next time Chrome

Powered by Google App Engine
This is Rietveld 408576698