| 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <limits> | 11 #include <limits> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/base_switches.h" | 14 #include "base/base_switches.h" |
| 15 #include "base/bind.h" | 15 #include "base/bind.h" |
| 16 #include "base/bind_helpers.h" | 16 #include "base/bind_helpers.h" |
| 17 #include "base/callback.h" | 17 #include "base/callback.h" |
| 18 #include "base/command_line.h" | 18 #include "base/command_line.h" |
| 19 #include "base/debug/trace_event.h" | |
| 20 #include "base/files/file.h" | 19 #include "base/files/file.h" |
| 21 #include "base/lazy_instance.h" | 20 #include "base/lazy_instance.h" |
| 22 #include "base/logging.h" | 21 #include "base/logging.h" |
| 23 #include "base/metrics/field_trial.h" | 22 #include "base/metrics/field_trial.h" |
| 24 #include "base/metrics/histogram.h" | 23 #include "base/metrics/histogram.h" |
| 25 #include "base/process/process_handle.h" | 24 #include "base/process/process_handle.h" |
| 26 #include "base/rand_util.h" | 25 #include "base/rand_util.h" |
| 27 #include "base/stl_util.h" | 26 #include "base/stl_util.h" |
| 28 #include "base/strings/string_number_conversions.h" | 27 #include "base/strings/string_number_conversions.h" |
| 29 #include "base/strings/string_util.h" | 28 #include "base/strings/string_util.h" |
| 30 #include "base/supports_user_data.h" | 29 #include "base/supports_user_data.h" |
| 31 #include "base/sys_info.h" | 30 #include "base/sys_info.h" |
| 32 #include "base/threading/thread.h" | 31 #include "base/threading/thread.h" |
| 33 #include "base/threading/thread_restrictions.h" | 32 #include "base/threading/thread_restrictions.h" |
| 33 #include "base/trace_event/trace_event.h" |
| 34 #include "base/tracked_objects.h" | 34 #include "base/tracked_objects.h" |
| 35 #include "cc/base/switches.h" | 35 #include "cc/base/switches.h" |
| 36 #include "content/browser/appcache/appcache_dispatcher_host.h" | 36 #include "content/browser/appcache/appcache_dispatcher_host.h" |
| 37 #include "content/browser/appcache/chrome_appcache_service.h" | 37 #include "content/browser/appcache/chrome_appcache_service.h" |
| 38 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" | 38 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" |
| 39 #include "content/browser/browser_child_process_host_impl.h" | 39 #include "content/browser/browser_child_process_host_impl.h" |
| 40 #include "content/browser/browser_main.h" | 40 #include "content/browser/browser_main.h" |
| 41 #include "content/browser/browser_main_loop.h" | 41 #include "content/browser/browser_main_loop.h" |
| 42 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 42 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
| 43 #include "content/browser/child_process_security_policy_impl.h" | 43 #include "content/browser/child_process_security_policy_impl.h" |
| (...skipping 2317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2361 | 2361 |
| 2362 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2362 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2363 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2363 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2364 DCHECK_GT(worker_ref_count_, 0); | 2364 DCHECK_GT(worker_ref_count_, 0); |
| 2365 --worker_ref_count_; | 2365 --worker_ref_count_; |
| 2366 if (worker_ref_count_ == 0) | 2366 if (worker_ref_count_ == 0) |
| 2367 Cleanup(); | 2367 Cleanup(); |
| 2368 } | 2368 } |
| 2369 | 2369 |
| 2370 } // namespace content | 2370 } // namespace content |
| OLD | NEW |