| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/thread.h" | 9 #include "base/thread.h" |
| 10 #include "base/waitable_event.h" | 10 #include "base/waitable_event.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 if (resource_dispatcher_host()->safe_browsing_service()) | 171 if (resource_dispatcher_host()->safe_browsing_service()) |
| 172 resource_dispatcher_host()->safe_browsing_service()->ShutDown(); | 172 resource_dispatcher_host()->safe_browsing_service()->ShutDown(); |
| 173 | 173 |
| 174 // Cancel pending requests and prevent new requests. | 174 // Cancel pending requests and prevent new requests. |
| 175 resource_dispatcher_host()->Shutdown(); | 175 resource_dispatcher_host()->Shutdown(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 // Shutdown DNS prefetching now to ensure that network stack objects | 178 // Shutdown DNS prefetching now to ensure that network stack objects |
| 179 // living on the IO thread get destroyed before the IO thread goes away. | 179 // living on the IO thread get destroyed before the IO thread goes away. |
| 180 io_thread_->message_loop()->PostTask(FROM_HERE, | 180 io_thread_->message_loop()->PostTask(FROM_HERE, |
| 181 NewRunnableFunction(chrome_browser_net::ShutdownDnsPrefetch)); | 181 NewRunnableFunction(chrome_browser_net::EnsureDnsPrefetchShutdown)); |
| 182 | 182 |
| 183 // Need to stop io_thread_ before resource_dispatcher_host_, since | 183 // Need to stop io_thread_ before resource_dispatcher_host_, since |
| 184 // io_thread_ may still deref ResourceDispatcherHost and handle resource | 184 // io_thread_ may still deref ResourceDispatcherHost and handle resource |
| 185 // request before going away. | 185 // request before going away. |
| 186 io_thread_.reset(); | 186 io_thread_.reset(); |
| 187 | 187 |
| 188 // Clean up state that lives on the file_thread_ before it goes away. | 188 // Clean up state that lives on the file_thread_ before it goes away. |
| 189 if (resource_dispatcher_host_.get()) { | 189 if (resource_dispatcher_host_.get()) { |
| 190 resource_dispatcher_host()->download_file_manager()->Shutdown(); | 190 resource_dispatcher_host()->download_file_manager()->Shutdown(); |
| 191 resource_dispatcher_host()->save_file_manager()->Shutdown(); | 191 resource_dispatcher_host()->save_file_manager()->Shutdown(); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 // TODO(port): remove this completely, it has no business being here. | 386 // TODO(port): remove this completely, it has no business being here. |
| 387 #endif | 387 #endif |
| 388 } | 388 } |
| 389 | 389 |
| 390 void BrowserProcessImpl::CreateGoogleURLTracker() { | 390 void BrowserProcessImpl::CreateGoogleURLTracker() { |
| 391 DCHECK(google_url_tracker_.get() == NULL); | 391 DCHECK(google_url_tracker_.get() == NULL); |
| 392 scoped_ptr<GoogleURLTracker> google_url_tracker(new GoogleURLTracker); | 392 scoped_ptr<GoogleURLTracker> google_url_tracker(new GoogleURLTracker); |
| 393 google_url_tracker_.swap(google_url_tracker); | 393 google_url_tracker_.swap(google_url_tracker); |
| 394 } | 394 } |
| 395 | 395 |
| OLD | NEW |