OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/sync/glue/bookmark_model_associator.h" | 5 #include "chrome/browser/sync/glue/bookmark_model_associator.h" |
6 | 6 |
7 #include <stack> | 7 #include <stack> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 return false; | 395 return false; |
396 *sync_id = sync_node.GetId(); | 396 *sync_id = sync_node.GetId(); |
397 return true; | 397 return true; |
398 } | 398 } |
399 | 399 |
400 syncer::SyncError BookmarkModelAssociator::AssociateModels( | 400 syncer::SyncError BookmarkModelAssociator::AssociateModels( |
401 syncer::SyncMergeResult* local_merge_result, | 401 syncer::SyncMergeResult* local_merge_result, |
402 syncer::SyncMergeResult* syncer_merge_result) { | 402 syncer::SyncMergeResult* syncer_merge_result) { |
403 // Since any changes to the bookmark model made here are not user initiated, | 403 // Since any changes to the bookmark model made here are not user initiated, |
404 // these change should not be undoable and so suspend the undo tracking. | 404 // these change should not be undoable and so suspend the undo tracking. |
405 #if !defined(OS_ANDROID) | |
406 ScopedSuspendBookmarkUndo suspend_undo(profile_); | 405 ScopedSuspendBookmarkUndo suspend_undo(profile_); |
407 #endif | 406 |
408 syncer::SyncError error = CheckModelSyncState(local_merge_result, | 407 syncer::SyncError error = CheckModelSyncState(local_merge_result, |
409 syncer_merge_result); | 408 syncer_merge_result); |
410 if (error.IsSet()) | 409 if (error.IsSet()) |
411 return error; | 410 return error; |
412 | 411 |
413 scoped_ptr<ScopedAssociationUpdater> association_updater( | 412 scoped_ptr<ScopedAssociationUpdater> association_updater( |
414 new ScopedAssociationUpdater(bookmark_model_)); | 413 new ScopedAssociationUpdater(bookmark_model_)); |
415 DisassociateModels(); | 414 DisassociateModels(); |
416 | 415 |
417 return BuildAssociations(local_merge_result, syncer_merge_result); | 416 return BuildAssociations(local_merge_result, syncer_merge_result); |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 syncer::SyncError::PERSISTENCE_ERROR, | 793 syncer::SyncError::PERSISTENCE_ERROR, |
795 message, | 794 message, |
796 syncer::BOOKMARKS); | 795 syncer::BOOKMARKS); |
797 } | 796 } |
798 } | 797 } |
799 } | 798 } |
800 return syncer::SyncError(); | 799 return syncer::SyncError(); |
801 } | 800 } |
802 | 801 |
803 } // namespace browser_sync | 802 } // namespace browser_sync |
OLD | NEW |