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

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

Issue 5159001: Rest of the autofill work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch uploaded to debug why try servers have problem applying this patch. Created 10 years 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/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 9e9fac71104cec4587a2b39b55e14ad973a61107..dba6a21c1c0b5b2261bf7844e0dd78a335e06fc2 100644
--- a/chrome/browser/sync/glue/bookmark_model_associator.cc
+++ b/chrome/browser/sync/glue/bookmark_model_associator.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/engine/syncapi.h"
+#include "chrome/browser/sync/syncable/autofill_migration.h"
#include "chrome/browser/sync/glue/bookmark_change_processor.h"
#include "chrome/browser/sync/profile_sync_service.h"
@@ -159,7 +160,8 @@ BookmarkModelAssociator::BookmarkModelAssociator(
UnrecoverableErrorHandler* persist_ids_error_handler)
: sync_service_(sync_service),
persist_ids_error_handler_(persist_ids_error_handler),
- ALLOW_THIS_IN_INITIALIZER_LIST(persist_associations_(this)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(persist_associations_(this)),
+ number_of_new_sync_nodes_created_at_association_(0) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(sync_service_);
DCHECK(persist_ids_error_handler_);
@@ -413,8 +415,19 @@ bool BookmarkModelAssociator::BuildAssociations() {
parent_node, model, i, &trans, this, sync_service_);
if (parent_node->GetChild(i)->is_folder())
dfs_stack.push(sync_child_id);
+ number_of_new_sync_nodes_created_at_association_++;
}
}
+
+ if (sync_service_->backend()->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(
+ syncable::AutofillMigrationDebugInfo::BOOKMARK_ADDED,
+ debug_info);
+ }
return true;
}
« no previous file with comments | « chrome/browser/sync/glue/bookmark_model_associator.h ('k') | chrome/browser/sync/glue/data_type_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698