| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event.h" | |
| 9 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/trace_event/trace_event.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "content/public/browser/render_process_host.h" | 12 #include "content/public/browser/render_process_host.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 #if defined(OS_ANDROID) | 16 #if defined(OS_ANDROID) |
| 17 // Set the render host waiting time to 5s on Android, that's the same | 17 // Set the render host waiting time to 5s on Android, that's the same |
| 18 // as an "Application Not Responding" timeout. | 18 // as an "Application Not Responding" timeout. |
| 19 const int64 kTimerDelaySeconds = 5; | 19 const int64 kTimerDelaySeconds = 5; |
| 20 #else | 20 #else |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 content::RenderProcessHost::AllHostsIterator()); | 173 content::RenderProcessHost::AllHostsIterator()); |
| 174 !iter.IsAtEnd(); iter.Advance()) { | 174 !iter.IsAtEnd(); iter.Advance()) { |
| 175 content::RenderProcessHost* render_process_host = iter.GetCurrentValue(); | 175 content::RenderProcessHost* render_process_host = iter.GetCurrentValue(); |
| 176 if (render_process_host && | 176 if (render_process_host && |
| 177 render_process_host->GetBrowserContext() == profile) { | 177 render_process_host->GetBrowserContext() == profile) { |
| 178 hosts->insert(render_process_host); | 178 hosts->insert(render_process_host); |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 return !hosts->empty(); | 181 return !hosts->empty(); |
| 182 } | 182 } |
| OLD | NEW |