Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2727)

Unified Diff: chrome/browser/profiles/profile.cc

Issue 7467012: Modifying prefetch to account for multi-profile. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile.cc
===================================================================
--- chrome/browser/profiles/profile.cc (revision 96503)
+++ chrome/browser/profiles/profile.cc (working copy)
@@ -26,6 +26,7 @@
#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/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"
@@ -232,6 +233,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()) {
+ predictor->GetHtmlInfo(output);
+ } else {
+ output->append("DNS pre-resolution and TCP pre-connection is disabled.");
+ }
+ output->append("</body></html>");
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
// OffTheRecordProfileImpl is a profile subclass that wraps an existing profile
// to make it suitable for the incognito mode.
//

Powered by Google App Engine
This is Rietveld 408576698