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

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor.cc

Issue 10704169: Revert 146170 - Adding a field trial to enable speculative resource prefetching learning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/predictors/resource_prefetch_predictor.cc
===================================================================
--- chrome/browser/predictors/resource_prefetch_predictor.cc (revision 146220)
+++ chrome/browser/predictors/resource_prefetch_predictor.cc (working copy)
@@ -18,7 +18,6 @@
#include "chrome/browser/history/url_database.h"
#include "chrome/browser/predictors/predictor_database.h"
#include "chrome/browser/predictors/predictor_database_factory.h"
-#include "chrome/browser/prerender/prerender_field_trial.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
@@ -115,8 +114,10 @@
}
// static
-bool ResourcePrefetchPredictor::IsEnabled(Profile* profile) {
- return prerender::IsSpeculativeResourcePrefetchingLearningEnabled(profile);
+bool ResourcePrefetchPredictor::IsEnabled() {
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ return command_line->HasSwitch(
+ switches::kEnableSpeculativeResourcePrefetching);
}
void ResourcePrefetchPredictor::LazilyInitialize() {

Powered by Google App Engine
This is Rietveld 408576698