OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/undo/bookmark_undo_service.h" | 5 #include "components/undo/bookmark_undo_service.h" |
6 | 6 |
7 #include "chrome/browser/undo/bookmark_renumber_observer.h" | |
8 #include "chrome/browser/undo/undo_operation.h" | |
9 #include "components/bookmarks/browser/bookmark_model.h" | 7 #include "components/bookmarks/browser/bookmark_model.h" |
10 #include "components/bookmarks/browser/bookmark_node_data.h" | 8 #include "components/bookmarks/browser/bookmark_node_data.h" |
11 #include "components/bookmarks/browser/bookmark_utils.h" | 9 #include "components/bookmarks/browser/bookmark_utils.h" |
12 #include "components/bookmarks/browser/scoped_group_bookmark_actions.h" | 10 #include "components/bookmarks/browser/scoped_group_bookmark_actions.h" |
| 11 #include "components/undo/bookmark_renumber_observer.h" |
| 12 #include "components/undo/undo_operation.h" |
13 #include "grit/components_strings.h" | 13 #include "grit/components_strings.h" |
14 | 14 |
15 using bookmarks::BookmarkModel; | 15 using bookmarks::BookmarkModel; |
16 using bookmarks::BookmarkNode; | 16 using bookmarks::BookmarkNode; |
17 using bookmarks::BookmarkNodeData; | 17 using bookmarks::BookmarkNodeData; |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // BookmarkUndoOperation ------------------------------------------------------ | 21 // BookmarkUndoOperation ------------------------------------------------------ |
22 | 22 |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 } | 486 } |
487 | 487 |
488 void BookmarkUndoService::OnBookmarkRenumbered(int64 old_id, int64 new_id) { | 488 void BookmarkUndoService::OnBookmarkRenumbered(int64 old_id, int64 new_id) { |
489 std::vector<UndoOperation*> all_operations = | 489 std::vector<UndoOperation*> all_operations = |
490 undo_manager()->GetAllUndoOperations(); | 490 undo_manager()->GetAllUndoOperations(); |
491 for (UndoOperation* op : all_operations) { | 491 for (UndoOperation* op : all_operations) { |
492 static_cast<BookmarkUndoOperation*>(op) | 492 static_cast<BookmarkUndoOperation*>(op) |
493 ->OnBookmarkRenumbered(old_id, new_id); | 493 ->OnBookmarkRenumbered(old_id, new_id); |
494 } | 494 } |
495 } | 495 } |
OLD | NEW |