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

Unified Diff: chrome/browser/net/prediction_options.cc

Issue 362533002: Make CanPredictNetworkActionsIO take io_data instead of resource_context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address msg2. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/prediction_options.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/prediction_options.cc
diff --git a/chrome/browser/net/prediction_options.cc b/chrome/browser/net/prediction_options.cc
index 53769cf3c7eab65f9ffe60e18733a1298112e8a1..a5c3efb5b8ab901243247c4644fc262b2bd84735 100644
--- a/chrome/browser/net/prediction_options.cc
+++ b/chrome/browser/net/prediction_options.cc
@@ -6,12 +6,10 @@
#include "base/logging.h"
#include "base/prefs/pref_service.h"
-#include "chrome/browser/net/predictor.h"
#include "chrome/browser/profiles/profile_io_data.h"
#include "chrome/common/pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "content/public/browser/browser_thread.h"
-#include "net/base/network_change_notifier.h"
namespace {
@@ -47,14 +45,13 @@ void RegisterPredictionOptionsProfilePrefs(
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
}
-bool CanPredictNetworkActionsIO(content::ResourceContext* resource_context) {
+bool CanPredictNetworkActionsIO(ProfileIOData* profile_io_data) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
- DCHECK(resource_context);
+ DCHECK(profile_io_data);
- ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
return CanPredictNetworkActions(
- io_data->network_prediction_options()->GetValue(),
- io_data->network_prediction_enabled()->GetValue());
+ profile_io_data->network_prediction_options()->GetValue(),
+ profile_io_data->network_prediction_enabled()->GetValue());
}
bool CanPredictNetworkActionsUI(PrefService* prefs) {
« no previous file with comments | « chrome/browser/net/prediction_options.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698