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

Side by Side Diff: chrome/browser/net/prediction_options.cc

Issue 518973002: Remove CanPredictNetworkActionsUI from prediction_options.cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments in predictor.h. Created 6 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/net/prediction_options.h ('k') | chrome/browser/net/predictor.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 2014 The Chromium Authors. All rights reserved. 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 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/net/prediction_options.h" 5 #include "chrome/browser/net/prediction_options.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile_io_data.h" 9 #include "chrome/browser/profiles/profile_io_data.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 profile_io_data->network_prediction_options()->GetValue()); 74 profile_io_data->network_prediction_options()->GetValue());
75 } 75 }
76 76
77 bool CanPrefetchAndPrerenderUI(PrefService* prefs) { 77 bool CanPrefetchAndPrerenderUI(PrefService* prefs) {
78 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 78 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
79 DCHECK(prefs); 79 DCHECK(prefs);
80 return CanPrefetchAndPrerender( 80 return CanPrefetchAndPrerender(
81 prefs->GetInteger(prefs::kNetworkPredictionOptions)); 81 prefs->GetInteger(prefs::kNetworkPredictionOptions));
82 } 82 }
83 83
84 bool CanPredictNetworkActionsUI(PrefService* prefs) {
85 return CanPrefetchAndPrerenderUI(prefs);
86 }
87
88 bool CanPreresolveAndPreconnectIO(ProfileIOData* profile_io_data) { 84 bool CanPreresolveAndPreconnectIO(ProfileIOData* profile_io_data) {
89 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); 85 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
90 DCHECK(profile_io_data); 86 DCHECK(profile_io_data);
91 return CanPreresolveAndPreconnect( 87 return CanPreresolveAndPreconnect(
92 profile_io_data->network_prediction_options()->GetValue()); 88 profile_io_data->network_prediction_options()->GetValue());
93 } 89 }
94 90
95 bool CanPreresolveAndPreconnectUI(PrefService* prefs) { 91 bool CanPreresolveAndPreconnectUI(PrefService* prefs) {
96 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 92 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
97 DCHECK(prefs); 93 DCHECK(prefs);
98 return CanPreresolveAndPreconnect( 94 return CanPreresolveAndPreconnect(
99 prefs->GetInteger(prefs::kNetworkPredictionOptions)); 95 prefs->GetInteger(prefs::kNetworkPredictionOptions));
100 } 96 }
101 97
102 } // namespace chrome_browser_net 98 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/prediction_options.h ('k') | chrome/browser/net/predictor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698