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

Unified Diff: chrome/browser/sync/glue/autofill_profile_model_associator.cc

Issue 6375007: [Sync] Refactored ProfileSyncService and remove its backend() function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment Created 9 years, 11 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/sync/glue/autofill_profile_model_associator.cc
diff --git a/chrome/browser/sync/glue/autofill_profile_model_associator.cc b/chrome/browser/sync/glue/autofill_profile_model_associator.cc
index d6a679230692a04eeabf54908503fb773bf7e181..e6e33d70e8ee0b8fe0a9cf172f07bb6342070899 100644
--- a/chrome/browser/sync/glue/autofill_profile_model_associator.cc
+++ b/chrome/browser/sync/glue/autofill_profile_model_associator.cc
@@ -105,8 +105,7 @@ bool AutofillProfileModelAssociator::TraverseAndAssociateChromeAutoFillProfiles(
bool AutofillProfileModelAssociator::GetSyncIdForTaggedNode(
const std::string& tag,
int64* sync_id) {
- sync_api::ReadTransaction trans(
- sync_service_->backend()->GetUserShareHandle());
+ sync_api::ReadTransaction trans(sync_service_->GetUserShare());
sync_api::ReadNode sync_node(&trans);
if (!sync_node.InitByTagLookup(tag.c_str()))
return false;
@@ -147,8 +146,7 @@ bool AutofillProfileModelAssociator::AssociateModels() {
{
// The write transaction lock is held inside this block.
// We do all the web db operations outside this block.
- sync_api::WriteTransaction trans(
- sync_service_->backend()->GetUserShareHandle());
+ sync_api::WriteTransaction trans(sync_service_->GetUserShare());
sync_api::ReadNode autofill_root(&trans);
if (!autofill_root.InitByTagLookup(kAutofillProfileTag)) {
@@ -172,15 +170,15 @@ bool AutofillProfileModelAssociator::AssociateModels() {
return false;
}
- if (sync_service_->backend()->GetAutofillMigrationState() !=
+ if (sync_service_->GetAutofillMigrationState() !=
syncable::MIGRATED) {
syncable::AutofillMigrationDebugInfo debug_info;
debug_info.autofill_profile_added_during_migration =
number_of_profiles_created_;
- sync_service_->backend()->SetAutofillMigrationDebugInfo(
+ sync_service_->SetAutofillMigrationDebugInfo(
syncable::AutofillMigrationDebugInfo::PROFILES_ADDED,
debug_info);
- sync_service()->backend()->SetAutofillMigrationState(
+ sync_service_->SetAutofillMigrationState(
syncable::MIGRATED);
}
@@ -208,8 +206,7 @@ bool AutofillProfileModelAssociator::MergeField(FormGroup* f,
bool AutofillProfileModelAssociator::SyncModelHasUserCreatedNodes(
bool *has_nodes) {
CHECK_NE(has_nodes, reinterpret_cast<bool*>(NULL));
- sync_api::ReadTransaction trans(
- sync_service_->backend()->GetUserShareHandle());
+ sync_api::ReadTransaction trans(sync_service_->GetUserShare());
sync_api::ReadNode node(&trans);
« no previous file with comments | « chrome/browser/sync/glue/autofill_profile_model_associator.h ('k') | chrome/browser/sync/glue/bookmark_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698