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

Side by Side Diff: chrome/browser/prefetch/prefetch_field_trial.cc

Issue 330063004: Various Prerender Service / Prerender LocalPredictor related changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: davidben feedback Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_field_trial.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/prefetch/prefetch_field_trial.h" 5 #include "chrome/browser/prefetch/prefetch_field_trial.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "chrome/browser/prerender/prerender_field_trial.h"
11 12
12 namespace prefetch { 13 namespace prefetch {
13 14
14 bool IsPrefetchFieldTrialEnabled() { 15 bool IsPrefetchFieldTrialEnabled() {
15 std::string experiment = base::FieldTrialList::FindFullName("Prefetch"); 16 std::string experiment = base::FieldTrialList::FindFullName("Prefetch");
16 if (StartsWithASCII(experiment, "ExperimentYes", false)) 17 if (StartsWithASCII(experiment, "ExperimentYes", false))
17 return true; 18 return true;
19 // If this client needs to prefetch for the Prerender Local Predictor,
20 // enable prefetching.
21 if (prerender::IsLocalPredictorPrerenderPrefetchEnabled())
22 return true;
18 return false; 23 return false;
19 } 24 }
20 25
21 } // namespace prefetch 26 } // namespace prefetch
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_field_trial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698