| Index: content/public/test/mock_render_process_host.cc
|
| diff --git a/content/public/test/mock_render_process_host.cc b/content/public/test/mock_render_process_host.cc
|
| index b6337d36c6e2b721fb8e00f099b25b76fe3b1bc2..403bc3c0e82682e4f164c863967c7f3e9076f9df 100644
|
| --- a/content/public/test/mock_render_process_host.cc
|
| +++ b/content/public/test/mock_render_process_host.cc
|
| @@ -57,9 +57,8 @@ MockRenderProcessHost::~MockRenderProcessHost() {
|
|
|
| // In unit tests, Cleanup() might not have been called.
|
| if (!deletion_callback_called_) {
|
| - FOR_EACH_OBSERVER(RenderProcessHostObserver,
|
| - observers_,
|
| - RenderProcessHostDestroyed(this));
|
| + for (auto& observer : observers_)
|
| + observer.RenderProcessHostDestroyed(this);
|
| RenderProcessHostImpl::UnregisterHost(GetID());
|
| }
|
| }
|
| @@ -72,9 +71,8 @@ void MockRenderProcessHost::SimulateCrash() {
|
| NOTIFICATION_RENDERER_PROCESS_CLOSED, Source<RenderProcessHost>(this),
|
| Details<RenderProcessHost::RendererClosedDetails>(&details));
|
|
|
| - FOR_EACH_OBSERVER(
|
| - RenderProcessHostObserver, observers_,
|
| - RenderProcessExited(this, details.status, details.exit_code));
|
| + for (auto& observer : observers_)
|
| + observer.RenderProcessExited(this, details.status, details.exit_code);
|
|
|
| // Send every routing ID a FrameHostMsg_RenderProcessGone message. To ensure a
|
| // predictable order for unittests which may assert against the order, we sort
|
| @@ -204,9 +202,8 @@ bool MockRenderProcessHost::IgnoreInputEvents() const {
|
|
|
| void MockRenderProcessHost::Cleanup() {
|
| if (listeners_.IsEmpty()) {
|
| - FOR_EACH_OBSERVER(RenderProcessHostObserver,
|
| - observers_,
|
| - RenderProcessHostDestroyed(this));
|
| + for (auto& observer : observers_)
|
| + observer.RenderProcessHostDestroyed(this);
|
| base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
|
| RenderProcessHostImpl::UnregisterHost(GetID());
|
| deletion_callback_called_ = true;
|
|
|