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

Side by Side Diff: chrome/browser/command_updater.cc

Issue 7342047: Cleanup base/stl_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed unneeded include + rebase Created 9 years, 5 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/command_updater.h" 5 #include "chrome/browser/command_updater.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
11 #include "base/stl_util-inl.h" 11 #include "base/stl_util.h"
12 12
13 CommandUpdater::CommandUpdaterDelegate::~CommandUpdaterDelegate() { 13 CommandUpdater::CommandUpdaterDelegate::~CommandUpdaterDelegate() {
14 } 14 }
15 15
16 class CommandUpdater::Command { 16 class CommandUpdater::Command {
17 public: 17 public:
18 bool enabled; 18 bool enabled;
19 ObserverList<CommandObserver> observers; 19 ObserverList<CommandObserver> observers;
20 20
21 Command() : enabled(true) {} 21 Command() : enabled(true) {}
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 void CommandUpdater::RemoveCommandObserver(CommandObserver* observer) { 78 void CommandUpdater::RemoveCommandObserver(CommandObserver* observer) {
79 for (CommandMap::const_iterator it = commands_.begin(); 79 for (CommandMap::const_iterator it = commands_.begin();
80 it != commands_.end(); 80 it != commands_.end();
81 ++it) { 81 ++it) {
82 Command* command = it->second; 82 Command* command = it->second;
83 if (command) 83 if (command)
84 command->observers.RemoveObserver(observer); 84 command->observers.RemoveObserver(observer);
85 } 85 }
86 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698