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

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

Issue 142473003: Binds prefetching to the predictive networking privacy option. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/prefetch/prefetch.h"
6
7 #include <string>
8
9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_util.h"
11 #include "chrome/browser/prefetch/prefetch_field_trial.h"
12 #include "chrome/browser/profiles/profile_io_data.h"
13
14 namespace prefetch {
15
16 bool IsPrefetchEnabled(content::ResourceContext* resource_context) {
17 ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
18 if (io_data != NULL && io_data->network_prediction_enabled()->GetValue())
19 return IsPrefetchFieldTrialEnabled();
20 return false;
21 }
22
23 } // namespace prefetch
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698