scoped_group_bookmark_actions.cc 607 B

12345678910111213141516171819202122
  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. #include "components/bookmarks/browser/scoped_group_bookmark_actions.h"
  5. #include "components/bookmarks/browser/bookmark_model.h"
  6. namespace bookmarks {
  7. ScopedGroupBookmarkActions::ScopedGroupBookmarkActions(BookmarkModel* model)
  8. : model_(model) {
  9. if (model_)
  10. model_->BeginGroupedChanges();
  11. }
  12. ScopedGroupBookmarkActions::~ScopedGroupBookmarkActions() {
  13. if (model_)
  14. model_->EndGroupedChanges();
  15. }
  16. } // namespace bookmarks