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/stats_counters.h" | 10 #include "base/stats_counters.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/net/dns_host_info.h" | 13 #include "chrome/browser/net/dns_host_info.h" |
14 #include "chrome/browser/browser.h" | 14 #include "chrome/browser/browser.h" |
15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/session_startup_pref.h" | 16 #include "chrome/browser/session_startup_pref.h" |
17 #include "chrome/common/notification_types.h" | 17 #include "chrome/common/notification_types.h" |
18 #include "chrome/common/notification_service.h" | 18 #include "chrome/common/notification_service.h" |
19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
20 #include "chrome/common/pref_service.h" | 20 #include "chrome/common/pref_service.h" |
21 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
22 #include "net/base/dns_resolution_observer.h" | 22 #include "net/base/dns_resolution_observer.h" |
23 | 23 |
| 24 using base::TimeDelta; |
| 25 |
24 namespace chrome_browser_net { | 26 namespace chrome_browser_net { |
25 | 27 |
26 static void DiscardAllPrefetchState(); | 28 static void DiscardAllPrefetchState(); |
27 | 29 |
28 //------------------------------------------------------------------------------ | 30 //------------------------------------------------------------------------------ |
29 // This section contains all the globally accessable API entry points for the | 31 // This section contains all the globally accessable API entry points for the |
30 // DNS Prefetching feature. | 32 // DNS Prefetching feature. |
31 //------------------------------------------------------------------------------ | 33 //------------------------------------------------------------------------------ |
32 | 34 |
33 // Status of prefetch feature, controlling whether any prefetching is done. | 35 // Status of prefetch feature, controlling whether any prefetching is done. |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 427 |
426 if (hostnames.size() > 0) | 428 if (hostnames.size() > 0) |
427 DnsPrefetchList(hostnames); | 429 DnsPrefetchList(hostnames); |
428 else | 430 else |
429 DnsPrefetch(std::string("www.google.com")); // Start a thread. | 431 DnsPrefetch(std::string("www.google.com")); // Start a thread. |
430 } | 432 } |
431 | 433 |
432 | 434 |
433 } // namespace chrome_browser_net | 435 } // namespace chrome_browser_net |
434 | 436 |
OLD | NEW |