OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/net/utility_process_mojo_proxy_resolver_factory.h" | 5 #include "chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
14 #include "chrome/grit/generated_resources.h" | 14 #include "chrome/grit/generated_resources.h" |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 #include "content/public/browser/utility_process_host.h" | 16 #include "content/public/browser/utility_process_host.h" |
17 #include "content/public/browser/utility_process_host_client.h" | 17 #include "content/public/browser/utility_process_host_client.h" |
18 #include "content/public/common/service_registry.h" | 18 #include "content/public/common/service_registry.h" |
19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
20 | 20 |
21 namespace { | 21 namespace { |
22 const int kUtilityProcessIdleTimeoutSeconds = 5; | 22 const int kUtilityProcessIdleTimeoutSeconds = 5; |
23 } | 23 } |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
118 void UtilityProcessMojoProxyResolverFactory::OnIdleTimeout() { | 118 void UtilityProcessMojoProxyResolverFactory::OnIdleTimeout() { |
119 DCHECK(thread_checker_.CalledOnValidThread()); | 119 DCHECK(thread_checker_.CalledOnValidThread()); |
120 DCHECK_EQ(num_proxy_resolvers_, 0u); | 120 DCHECK_EQ(num_proxy_resolvers_, 0u); |
121 delete weak_utility_process_host_.get(); | 121 delete weak_utility_process_host_.get(); |
122 weak_utility_process_host_.reset(); | 122 weak_utility_process_host_.reset(); |
123 resolver_factory_.reset(); | 123 resolver_factory_.reset(); |
124 } | 124 } |
OLD | NEW |