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

Unified Diff: chrome/browser/renderer_host/chrome_render_message_filter.cc

Issue 7467012: Modifying prefetch to account for multi-profile. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Modifying prefetch to account for multi-profile. Created 9 years, 3 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/renderer_host/chrome_render_message_filter.cc
===================================================================
--- chrome/browser/renderer_host/chrome_render_message_filter.cc (revision 100345)
+++ chrome/browser/renderer_host/chrome_render_message_filter.cc (working copy)
@@ -17,7 +17,7 @@
#include "chrome/browser/metrics/histogram_synchronizer.h"
#include "chrome/browser/nacl_host/nacl_process_host.h"
#include "chrome/browser/net/chrome_url_request_context.h"
-#include "chrome/browser/net/predictor_api.h"
+#include "chrome/browser/net/predictor.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/task_manager/task_manager.h"
@@ -196,7 +196,8 @@
void ChromeRenderMessageFilter::OnDnsPrefetch(
const std::vector<std::string>& hostnames) {
- chrome_browser_net::DnsPrefetchList(hostnames);
+ if (profile_->GetNetworkPredictor())
+ profile_->GetNetworkPredictor()->DnsPrefetchList(hostnames);
}
void ChromeRenderMessageFilter::OnRendererHistograms(
@@ -514,7 +515,9 @@
void ChromeRenderMessageFilter::OnClearPredictorCache(int* result) {
// This function is disabled unless the user has enabled
// benchmarking extensions.
- chrome_browser_net::ClearPredictorCache();
+ chrome_browser_net::Predictor* predictor = profile_->GetNetworkPredictor();
+ if (predictor)
+ predictor->DiscardAllResults();
*result = 0;
}

Powered by Google App Engine
This is Rietveld 408576698