scoped_group_bookmark_actions.h 908 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_BOOKMARKS_BROWSER_SCOPED_GROUP_BOOKMARK_ACTIONS_H_
  5. #define COMPONENTS_BOOKMARKS_BROWSER_SCOPED_GROUP_BOOKMARK_ACTIONS_H_
  6. #include "base/memory/raw_ptr.h"
  7. namespace bookmarks {
  8. class BookmarkModel;
  9. // Scopes the grouping of a set of changes into one undoable action.
  10. class ScopedGroupBookmarkActions {
  11. public:
  12. explicit ScopedGroupBookmarkActions(BookmarkModel* model);
  13. ScopedGroupBookmarkActions(const ScopedGroupBookmarkActions&) = delete;
  14. ScopedGroupBookmarkActions& operator=(const ScopedGroupBookmarkActions&) =
  15. delete;
  16. ~ScopedGroupBookmarkActions();
  17. private:
  18. raw_ptr<BookmarkModel> model_;
  19. };
  20. } // namespace bookmarks
  21. #endif // COMPONENTS_BOOKMARKS_BROWSER_SCOPED_GROUP_BOOKMARK_ACTIONS_H_