| 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/net/dns_global.h" | 5 #include "chrome/browser/net/dns_global.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 } | 437 } |
| 438 } | 438 } |
| 439 | 439 |
| 440 void EnsureDnsPrefetchShutdown() { | 440 void EnsureDnsPrefetchShutdown() { |
| 441 if (NULL != dns_master) { | 441 if (NULL != dns_master) { |
| 442 dns_master->Shutdown(); | 442 dns_master->Shutdown(); |
| 443 | 443 |
| 444 // Stop observing DNS resolutions. Note that dns_master holds a reference | 444 // Stop observing DNS resolutions. Note that dns_master holds a reference |
| 445 // to the global host resolver, so is guaranteed to be live. | 445 // to the global host resolver, so is guaranteed to be live. |
| 446 GetGlobalHostResolver()->RemoveObserver(&dns_resolution_observer); | 446 GetGlobalHostResolver()->RemoveObserver(&dns_resolution_observer); |
| 447 |
| 448 // TODO(eroman): temp hack for http://crbug.com/15513 |
| 449 GetGlobalHostResolver()->Shutdown(); |
| 447 } | 450 } |
| 448 | 451 |
| 449 // TODO(eroman): This is a hack so the in process browser tests work if | 452 // TODO(eroman): This is a hack so the in process browser tests work if |
| 450 // BrowserMain() is to be called again. | 453 // BrowserMain() is to be called again. |
| 451 global_host_resolver = NULL; | 454 global_host_resolver = NULL; |
| 452 } | 455 } |
| 453 | 456 |
| 454 void FreeDnsPrefetchResources() { | 457 void FreeDnsPrefetchResources() { |
| 455 DCHECK(NULL != dns_master); | 458 DCHECK(NULL != dns_master); |
| 456 dns_master->Release(); | 459 dns_master->Release(); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 dns_master->DeserializeReferrers(*referral_list); | 549 dns_master->DeserializeReferrers(*referral_list); |
| 547 } | 550 } |
| 548 | 551 |
| 549 void TrimSubresourceReferrers() { | 552 void TrimSubresourceReferrers() { |
| 550 if (NULL == dns_master) | 553 if (NULL == dns_master) |
| 551 return; | 554 return; |
| 552 dns_master->TrimReferrers(); | 555 dns_master->TrimReferrers(); |
| 553 } | 556 } |
| 554 | 557 |
| 555 } // namespace chrome_browser_net | 558 } // namespace chrome_browser_net |
| OLD | NEW |