1a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 2a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)// found in the LICENSE file. 4a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 5cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "components/bookmarks/browser/scoped_group_bookmark_actions.h" 6a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 7cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "components/bookmarks/browser/bookmark_model.h" 8cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 9cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)namespace bookmarks { 10a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 11a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)ScopedGroupBookmarkActions::ScopedGroupBookmarkActions(BookmarkModel* model) 12a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) : model_(model) { 13a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) if (model_) 14a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) model_->BeginGroupedChanges(); 15a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)} 16a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 17a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)ScopedGroupBookmarkActions::~ScopedGroupBookmarkActions() { 18a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) if (model_) 19a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) model_->EndGroupedChanges(); 20a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)} 21cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 22cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)} // namespace bookmarks 23