Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: chrome/browser/undo/bookmark_undo_utils.cc

Issue 176563002: Revert r252832: Eliminate Bookmarks dependence to bookmark_undo_utils.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/undo/bookmark_undo_utils.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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_utils.h" 5 #include "chrome/browser/undo/bookmark_undo_utils.h"
6 6
7 #include "chrome/browser/undo/bookmark_undo_service.h" 7 #include "chrome/browser/undo/bookmark_undo_service.h"
8 #include "chrome/browser/undo/bookmark_undo_service_factory.h" 8 #include "chrome/browser/undo/bookmark_undo_service_factory.h"
9 #include "chrome/browser/undo/undo_manager.h" 9 #include "chrome/browser/undo/undo_manager.h"
10 10
(...skipping 15 matching lines...) Expand all
26 UndoManager* undo_manager = GetUndoManager(profile_); 26 UndoManager* undo_manager = GetUndoManager(profile_);
27 if (undo_manager) 27 if (undo_manager)
28 undo_manager->SuspendUndoTracking(); 28 undo_manager->SuspendUndoTracking();
29 } 29 }
30 30
31 ScopedSuspendBookmarkUndo::~ScopedSuspendBookmarkUndo() { 31 ScopedSuspendBookmarkUndo::~ScopedSuspendBookmarkUndo() {
32 UndoManager *undo_manager = GetUndoManager(profile_); 32 UndoManager *undo_manager = GetUndoManager(profile_);
33 if (undo_manager) 33 if (undo_manager)
34 undo_manager->ResumeUndoTracking(); 34 undo_manager->ResumeUndoTracking();
35 } 35 }
36
37 // ScopedGroupBookmarkActions -------------------------------------------------
38
39 ScopedGroupBookmarkActions::ScopedGroupBookmarkActions(Profile* profile)
40 : profile_(profile) {
41 UndoManager *undo_manager = GetUndoManager(profile_);
42 if (undo_manager)
43 undo_manager->StartGroupingActions();
44 }
45
46 ScopedGroupBookmarkActions::~ScopedGroupBookmarkActions() {
47 UndoManager *undo_manager = GetUndoManager(profile_);
48 if (undo_manager)
49 undo_manager->EndGroupingActions();
50 }
OLDNEW
« no previous file with comments | « chrome/browser/undo/bookmark_undo_utils.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698