Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 11 |
| 12 namespace prefetch { | 12 namespace prefetch { |
| 13 | 13 |
| 14 bool IsPrefetchEnabled() { | 14 bool IsPrefetchFieldTrialEnabled() { |
| 15 std::string experiment = base::FieldTrialList::FindFullName("Prefetch"); | 15 std::string experiment = base::FieldTrialList::FindFullName("Prefetch"); |
|
tburkard
2014/01/27 12:26:34
I guess this does not have to be called on the UI
jkarlin
2014/01/27 13:49:00
Looking at field_trial.h it says that it should on
| |
| 16 if (StartsWithASCII(experiment, "ExperimentYes", false)) | 16 if (StartsWithASCII(experiment, "ExperimentYes", false)) |
| 17 return true; | 17 return true; |
| 18 return false; | 18 return false; |
| 19 } | 19 } |
| 20 | 20 |
| 21 } // namespace prefetch | 21 } // namespace prefetch |
| OLD | NEW |