OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 if (render_process_host_) | 775 if (render_process_host_) |
776 render_process_host_->RemoveObserver(this); | 776 render_process_host_->RemoveObserver(this); |
777 } | 777 } |
778 | 778 |
779 void RenderProcessHostWatcher::Wait() { | 779 void RenderProcessHostWatcher::Wait() { |
780 message_loop_runner_->Run(); | 780 message_loop_runner_->Run(); |
781 } | 781 } |
782 | 782 |
783 void RenderProcessHostWatcher::RenderProcessExited( | 783 void RenderProcessHostWatcher::RenderProcessExited( |
784 RenderProcessHost* host, | 784 RenderProcessHost* host, |
785 base::ProcessHandle handle, | |
786 base::TerminationStatus status, | 785 base::TerminationStatus status, |
787 int exit_code) { | 786 int exit_code) { |
788 if (type_ == WATCH_FOR_PROCESS_EXIT) | 787 if (type_ == WATCH_FOR_PROCESS_EXIT) |
789 message_loop_runner_->Quit(); | 788 message_loop_runner_->Quit(); |
790 } | 789 } |
791 | 790 |
792 void RenderProcessHostWatcher::RenderProcessHostDestroyed( | 791 void RenderProcessHostWatcher::RenderProcessHostDestroyed( |
793 RenderProcessHost* host) { | 792 RenderProcessHost* host) { |
794 render_process_host_ = NULL; | 793 render_process_host_ = NULL; |
795 if (type_ == WATCH_FOR_HOST_DESTRUCTION) | 794 if (type_ == WATCH_FOR_HOST_DESTRUCTION) |
(...skipping 29 matching lines...) Expand all Loading... |
825 } | 824 } |
826 // The queue should not be empty, unless we were quit because of a timeout. | 825 // The queue should not be empty, unless we were quit because of a timeout. |
827 if (message_queue_.empty()) | 826 if (message_queue_.empty()) |
828 return false; | 827 return false; |
829 *message = message_queue_.front(); | 828 *message = message_queue_.front(); |
830 message_queue_.pop(); | 829 message_queue_.pop(); |
831 return true; | 830 return true; |
832 } | 831 } |
833 | 832 |
834 } // namespace content | 833 } // namespace content |
OLD | NEW |