| 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 "chrome/browser/undo/bookmark_undo_service.h" |
| 6 | 6 |
| 7 #include "chrome/browser/undo/bookmark_renumber_observer.h" | 7 #include "chrome/browser/undo/bookmark_renumber_observer.h" |
| 8 #include "chrome/browser/undo/undo_operation.h" | 8 #include "chrome/browser/undo/undo_operation.h" |
| 9 #include "chrome/grit/generated_resources.h" | |
| 10 #include "components/bookmarks/browser/bookmark_model.h" | 9 #include "components/bookmarks/browser/bookmark_model.h" |
| 11 #include "components/bookmarks/browser/bookmark_node_data.h" | 10 #include "components/bookmarks/browser/bookmark_node_data.h" |
| 12 #include "components/bookmarks/browser/bookmark_utils.h" | 11 #include "components/bookmarks/browser/bookmark_utils.h" |
| 13 #include "components/bookmarks/browser/scoped_group_bookmark_actions.h" | 12 #include "components/bookmarks/browser/scoped_group_bookmark_actions.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 |
| 23 // Base class for all bookmark related UndoOperations that facilitates access to | 23 // Base class for all bookmark related UndoOperations that facilitates access to |
| (...skipping 462 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 |