diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-27 12:25:57 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-27 12:25:57 +0000 |
commit | 420337ccf1040e37903b0356cbe4f6aba609736a (patch) | |
tree | f5e614aa9397f4d75cc3499c15b3e1adaa75a784 /chrome/browser/automation | |
parent | 3c69c436d8223f687c365e9796c48655f73df603 (diff) | |
download | chromium_src-420337ccf1040e37903b0356cbe4f6aba609736a.zip chromium_src-420337ccf1040e37903b0356cbe4f6aba609736a.tar.gz chromium_src-420337ccf1040e37903b0356cbe4f6aba609736a.tar.bz2 |
Cleanup: Use STLDeleteFoo instead of duplicating their functions, and other lint fixes.
Review URL: https://chromiumcodereview.appspot.com/11305018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/automation_event_queue.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/chrome/browser/automation/automation_event_queue.cc b/chrome/browser/automation/automation_event_queue.cc index 411a969..28401d7 100644 --- a/chrome/browser/automation/automation_event_queue.cc +++ b/chrome/browser/automation/automation_event_queue.cc @@ -5,6 +5,7 @@ #include <algorithm> #include "base/logging.h" +#include "base/stl_util.h" #include "chrome/browser/automation/automation_event_observers.h" #include "chrome/browser/automation/automation_event_queue.h" #include "chrome/browser/automation/automation_provider_json.h" @@ -99,19 +100,11 @@ bool AutomationEventQueue::RemoveObserver(int observer_id) { } void AutomationEventQueue::ClearObservers() { - std::map<int, AutomationEventObserver*>::iterator it; - for (it = observers_.begin(); it != observers_.end(); it++) { - delete it->second; - } - observers_.clear(); + STLDeleteValues(&observers_); } void AutomationEventQueue::ClearEvents() { - std::list<AutomationEvent*>::iterator it; - for (it = event_queue_.begin(); it != event_queue_.end(); it++) { - delete *it; - } - event_queue_.clear(); + STLDeleteElements(&event_queue_); } bool AutomationEventQueue::CheckReturnEvent() { |