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

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: Pure merge to 12853004 (move table creation to factory) 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 2e936dce58f08efd83929215ba8bbb4482a134d1..2290a56504499d7d3b7fb2ad40df297617060232 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"
@@ -45,14 +45,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() {
@@ -61,7 +61,7 @@ AutofillProfileSyncableService::~AutofillProfileSyncableService() {
// static
void AutofillProfileSyncableService::CreateForWebDataService(
- WebDataService* web_data) {
+ AutofillWebDataService* web_data) {
dhollowa 2013/03/21 16:44:07 web_data -> web_data_service
Cait (Slow) 2013/03/21 23:23:27 Done.
web_data->GetDBUserData()->SetUserData(
UserDataKey(), new AutofillProfileSyncableService(web_data));
}
@@ -69,7 +69,7 @@ void AutofillProfileSyncableService::CreateForWebDataService(
// static
AutofillProfileSyncableService*
AutofillProfileSyncableService::FromWebDataService(
- WebDataService* service) {
+ AutofillWebDataService* service) {
dhollowa 2013/03/21 16:44:07 service -> web_data_service
Cait (Slow) 2013/03/21 23:23:27 Done.
return static_cast<AutofillProfileSyncableService*>(
service->GetDBUserData()->GetUserData(UserDataKey()));
}
@@ -184,7 +184,7 @@ AutofillProfileSyncableService::MergeDataAndStartSyncing(
sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes));
}
- WebDataService::NotifyOfMultipleAutofillChanges(web_data_service_);
+ AutofillWebDataService::NotifyOfMultipleAutofillChanges(web_data_service_);
return merge_result;
}
@@ -255,7 +255,7 @@ syncer::SyncError AutofillProfileSyncableService::ProcessSyncChanges(
"Failed to update webdata.");
}
- WebDataService::NotifyOfMultipleAutofillChanges(web_data_service_);
+ AutofillWebDataService::NotifyOfMultipleAutofillChanges(web_data_service_);
return syncer::SyncError();
}
@@ -264,7 +264,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