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

Side by Side Diff: components/undo/undo_manager.cc

Issue 2712513004: Use a qualified path for grit-generated headers in components/ (Closed)
Patch Set: more checkdeps Created 3 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
OLDNEW
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 "components/undo/undo_manager.h" 5 #include "components/undo/undo_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "components/strings/grit/components_strings.h"
12 #include "components/undo/undo_manager_observer.h" 13 #include "components/undo/undo_manager_observer.h"
13 #include "components/undo/undo_operation.h" 14 #include "components/undo/undo_operation.h"
14 #include "grit/components_strings.h"
15 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
16 16
17 namespace { 17 namespace {
18 18
19 // Maximum number of changes that can be undone. 19 // Maximum number of changes that can be undone.
20 const size_t kMaxUndoGroups = 100; 20 const size_t kMaxUndoGroups = 100;
21 21
22 } // namespace 22 } // namespace
23 23
24 // UndoGroup ------------------------------------------------------------------ 24 // UndoGroup ------------------------------------------------------------------
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // Limit the number of undo levels so the undo stack does not grow unbounded. 192 // Limit the number of undo levels so the undo stack does not grow unbounded.
193 if (GetActiveUndoGroup()->size() > kMaxUndoGroups) 193 if (GetActiveUndoGroup()->size() > kMaxUndoGroups)
194 GetActiveUndoGroup()->erase(GetActiveUndoGroup()->begin()); 194 GetActiveUndoGroup()->erase(GetActiveUndoGroup()->begin());
195 195
196 NotifyOnUndoManagerStateChange(); 196 NotifyOnUndoManagerStateChange();
197 } 197 }
198 198
199 std::vector<std::unique_ptr<UndoGroup>>* UndoManager::GetActiveUndoGroup() { 199 std::vector<std::unique_ptr<UndoGroup>>* UndoManager::GetActiveUndoGroup() {
200 return performing_undo_ ? &redo_actions_ : &undo_actions_; 200 return performing_undo_ ? &redo_actions_ : &undo_actions_;
201 } 201 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698