Chromium Code Reviews| Index: chrome/browser/profiles/profile.cc |
| =================================================================== |
| --- chrome/browser/profiles/profile.cc (revision 96009) |
| +++ chrome/browser/profiles/profile.cc (working copy) |
| @@ -26,6 +26,8 @@ |
| #include "chrome/browser/extensions/extension_service.h" |
| #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| #include "chrome/browser/extensions/extension_webrequest_api.h" |
| +#include "chrome/browser/io_thread.h" |
|
willchan no longer on Chromium
2011/08/10 07:04:08
Is this include needed still?
rpetterson
2011/08/12 03:12:36
Nope. Removed.
|
| +#include "chrome/browser/net/predictor.h" |
| #include "chrome/browser/net/pref_proxy_config_service.h" |
| #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| #include "chrome/browser/prefs/pref_service.h" |
| @@ -225,6 +227,29 @@ |
| //////////////////////////////////////////////////////////////////////////////// |
| // |
| +// This section supports the about:dns page. |
| +// |
| +//////////////////////////////////////////////////////////////////////////////// |
| + |
| +// Provide global support for the about:dns page. |
| +void Profile::PredictorGetHtmlInfo(std::string* output) { |
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| + |
| + output->append("<html><head><title>About DNS</title>" |
| + // We'd like the following no-cache... but it doesn't work. |
| + // "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">" |
| + "</head><body>"); |
| + chrome_browser_net::Predictor* predictor = GetNetworkPredictor(); |
| + if (predictor && predictor->predictor_enabled()) { |
| + output->append("DNS pre-resolution and TCP pre-connection is disabled."); |
| + } else { |
| + predictor->GetHtmlInfo(output); |
| + } |
| + output->append("</body></html>"); |
| +} |
| + |
| +//////////////////////////////////////////////////////////////////////////////// |
| +// |
| // OffTheRecordProfileImpl is a profile subclass that wraps an existing profile |
| // to make it suitable for the incognito mode. |
| // |