| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/browser_child_process_host.h" | 5 #include "content/browser/browser_child_process_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "base/process_util.h" | 13 #include "base/process_util.h" |
| 14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "content/browser/profiler_message_filter.h" |
| 16 #include "content/browser/renderer_host/resource_message_filter.h" | 17 #include "content/browser/renderer_host/resource_message_filter.h" |
| 17 #include "content/browser/trace_message_filter.h" | 18 #include "content/browser/trace_message_filter.h" |
| 18 #include "content/common/plugin_messages.h" | 19 #include "content/common/plugin_messages.h" |
| 19 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
| 20 #include "content/public/browser/content_browser_client.h" | 21 #include "content/public/browser/content_browser_client.h" |
| 21 #include "content/public/browser/notification_service.h" | 22 #include "content/public/browser/notification_service.h" |
| 22 #include "content/public/browser/notification_types.h" | 23 #include "content/public/browser/notification_types.h" |
| 23 #include "content/public/common/content_switches.h" | 24 #include "content/public/common/content_switches.h" |
| 24 #include "content/public/common/result_codes.h" | 25 #include "content/public/common/result_codes.h" |
| 25 | 26 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 62 |
| 62 BrowserChildProcessHost::BrowserChildProcessHost( | 63 BrowserChildProcessHost::BrowserChildProcessHost( |
| 63 ChildProcessInfo::ProcessType type) | 64 ChildProcessInfo::ProcessType type) |
| 64 : ChildProcessInfo(type, -1), | 65 : ChildProcessInfo(type, -1), |
| 65 ALLOW_THIS_IN_INITIALIZER_LIST(client_(this)), | 66 ALLOW_THIS_IN_INITIALIZER_LIST(client_(this)), |
| 66 #if !defined(OS_WIN) | 67 #if !defined(OS_WIN) |
| 67 ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)), | 68 ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)), |
| 68 #endif | 69 #endif |
| 69 disconnect_was_alive_(false) { | 70 disconnect_was_alive_(false) { |
| 70 AddFilter(new TraceMessageFilter); | 71 AddFilter(new TraceMessageFilter); |
| 72 AddFilter(new ProfilerMessageFilter); |
| 71 | 73 |
| 72 g_child_process_list.Get().push_back(this); | 74 g_child_process_list.Get().push_back(this); |
| 73 } | 75 } |
| 74 | 76 |
| 75 BrowserChildProcessHost::~BrowserChildProcessHost() { | 77 BrowserChildProcessHost::~BrowserChildProcessHost() { |
| 76 g_child_process_list.Get().remove(this); | 78 g_child_process_list.Get().remove(this); |
| 77 } | 79 } |
| 78 | 80 |
| 79 // static | 81 // static |
| 80 void BrowserChildProcessHost::TerminateAll() { | 82 void BrowserChildProcessHost::TerminateAll() { |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 | 276 |
| 275 return *iterator_; | 277 return *iterator_; |
| 276 } while (true); | 278 } while (true); |
| 277 | 279 |
| 278 return NULL; | 280 return NULL; |
| 279 } | 281 } |
| 280 | 282 |
| 281 bool BrowserChildProcessHost::Iterator::Done() { | 283 bool BrowserChildProcessHost::Iterator::Done() { |
| 282 return iterator_ == g_child_process_list.Get().end(); | 284 return iterator_ == g_child_process_list.Get().end(); |
| 283 } | 285 } |
| OLD | NEW |