diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-02 20:37:27 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-02 20:37:27 +0000 |
commit | 019191a62f17852c6e8a5085bbd62e804d559718 (patch) | |
tree | 3867502e4a71d6589c5183ea0e6f85a481ee869d /chrome/browser/browser_shutdown.cc | |
parent | 2d8d923da42df61e9d65942945456d4b9304ef8e (diff) | |
download | chromium_src-019191a62f17852c6e8a5085bbd62e804d559718.zip chromium_src-019191a62f17852c6e8a5085bbd62e804d559718.tar.gz chromium_src-019191a62f17852c6e8a5085bbd62e804d559718.tar.bz2 |
Convert users of RenderProcessHost iterator to all use same style. The key motivator for this is that at least one old place actually did the wrong thing in its loop and failed to call functions on anything but the first host. This also makes many places slightly shorter.
Remove an unneeded #include in web_cache_manager.h by converting it to a forward declaration.
Update copyrights on touched files.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/242104
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27890 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_shutdown.cc')
-rw-r--r-- | chrome/browser/browser_shutdown.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index 22f4507..d3530bb 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -72,10 +72,10 @@ void OnShutdownStarting(ShutdownType type) { // shutdown path for the ones that didn't exit here. shutdown_num_processes_ = 0; shutdown_num_processes_slow_ = 0; - RenderProcessHost::iterator hosts(RenderProcessHost::AllHostsIterator()); - while (!hosts.IsAtEnd()) { - shutdown_num_processes_++; - if (!hosts.GetCurrentValue()->FastShutdownIfPossible()) { + for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); + !i.IsAtEnd(); i.Advance()) { + ++shutdown_num_processes_; + if (!i.GetCurrentValue()->FastShutdownIfPossible()) { shutdown_num_processes_slow_++; } |