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 "chrome/browser/profiles/profile_destroyer.h" | 5 #include "chrome/browser/profiles/profile_destroyer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "content/public/browser/render_process_host.h" | 16 #include "content/public/browser/render_process_host.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 #if defined(OS_ANDROID) | 20 #if defined(OS_ANDROID) |
21 // Set the render host waiting time to 5s on Android, that's the same | 21 // Set the render host waiting time to 5s on Android, that's the same |
22 // as an "Application Not Responding" timeout. | 22 // as an "Application Not Responding" timeout. |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 content::RenderProcessHost::AllHostsIterator()); | 178 content::RenderProcessHost::AllHostsIterator()); |
179 !iter.IsAtEnd(); iter.Advance()) { | 179 !iter.IsAtEnd(); iter.Advance()) { |
180 content::RenderProcessHost* render_process_host = iter.GetCurrentValue(); | 180 content::RenderProcessHost* render_process_host = iter.GetCurrentValue(); |
181 if (render_process_host && | 181 if (render_process_host && |
182 render_process_host->GetBrowserContext() == profile) { | 182 render_process_host->GetBrowserContext() == profile) { |
183 hosts->insert(render_process_host); | 183 hosts->insert(render_process_host); |
184 } | 184 } |
185 } | 185 } |
186 return !hosts->empty(); | 186 return !hosts->empty(); |
187 } | 187 } |
OLD | NEW |