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

Unified Diff: chrome/browser/sync/glue/bookmark_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
« no previous file with comments | « chrome/browser/sync/glue/bookmark_model_associator.h ('k') | chrome/browser/sync/glue/extension_sync.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/bookmark_model_associator.cc
diff --git a/chrome/browser/sync/glue/bookmark_model_associator.cc b/chrome/browser/sync/glue/bookmark_model_associator.cc
index dba6a21c1c0b5b2261bf7844e0dd78a335e06fc2..3a5f1bde0349317600ffb343fd96d83eae755151 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -237,8 +237,7 @@ bool BookmarkModelAssociator::SyncModelHasUserCreatedNodes(bool* has_nodes) {
return false;
}
- sync_api::ReadTransaction trans(
- sync_service_->backend()->GetUserShareHandle());
+ sync_api::ReadTransaction trans(sync_service_->GetUserShare());
sync_api::ReadNode bookmark_bar_node(&trans);
if (!bookmark_bar_node.InitByIdLookup(bookmark_bar_sync_id)) {
@@ -288,8 +287,7 @@ bool BookmarkModelAssociator::AssociateTaggedPermanentNode(
bool BookmarkModelAssociator::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;
@@ -355,8 +353,7 @@ bool BookmarkModelAssociator::BuildAssociations() {
dfs_stack.push(other_bookmarks_sync_id);
dfs_stack.push(bookmark_bar_sync_id);
- sync_api::WriteTransaction trans(
- sync_service_->backend()->GetUserShareHandle());
+ sync_api::WriteTransaction trans(sync_service_->GetUserShare());
while (!dfs_stack.empty()) {
int64 sync_parent_id = dfs_stack.top();
@@ -419,12 +416,12 @@ bool BookmarkModelAssociator::BuildAssociations() {
}
}
- if (sync_service_->backend()->GetAutofillMigrationState() !=
+ if (sync_service_->GetAutofillMigrationState() !=
syncable::MIGRATED) {
syncable::AutofillMigrationDebugInfo debug_info;
debug_info.bookmarks_added_during_migration =
number_of_new_sync_nodes_created_at_association_;
- sync_service_->backend()->SetAutofillMigrationDebugInfo(
+ sync_service_->SetAutofillMigrationDebugInfo(
syncable::AutofillMigrationDebugInfo::BOOKMARK_ADDED,
debug_info);
}
@@ -451,8 +448,7 @@ void BookmarkModelAssociator::PersistAssociations() {
return;
}
- sync_api::WriteTransaction trans(
- sync_service_->backend()->GetUserShareHandle());
+ sync_api::WriteTransaction trans(sync_service_->GetUserShare());
DirtyAssociationsSyncIds::iterator iter;
for (iter = dirty_associations_sync_ids_.begin();
iter != dirty_associations_sync_ids_.end();
@@ -506,8 +502,7 @@ bool BookmarkModelAssociator::LoadAssociations() {
dfs_stack.push(other_bookmarks_id);
dfs_stack.push(bookmark_bar_id);
- sync_api::ReadTransaction trans(
- sync_service_->backend()->GetUserShareHandle());
+ sync_api::ReadTransaction trans(sync_service_->GetUserShare());
// Count total number of nodes in sync model so that we can compare that
// with the total number of nodes in the bookmark model.
« no previous file with comments | « chrome/browser/sync/glue/bookmark_model_associator.h ('k') | chrome/browser/sync/glue/extension_sync.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698