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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 2103323007: Exposing NQE on the Browser UI thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changing OWNERS to map to net/nqe/OWNERS Created 4 years, 5 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
Index: chrome/browser/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 04a4e743c55215d95a3b5fb434fb18f3c45b455b..ac0fe1c11ef3a2e6dbde1f92a863251f501134dc 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -21,20 +21,22 @@
#include "base/threading/worker_pool.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
#include "chrome/browser/io_thread.h"
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/net/http_server_properties_manager_factory.h"
+#include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
+#include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h"
#include "chrome/browser/net/predictor.h"
#include "chrome/browser/net/quota_policy_channel_id_store.h"
#include "chrome/browser/net/sdch_owner_pref_storage.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
@@ -196,20 +198,24 @@ void ProfileImplIOData::Handle::Init(
pool->GetSequenceToken(),
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
std::unique_ptr<data_reduction_proxy::DataStore> store(
new data_reduction_proxy::DataStoreImpl(profile_path));
DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile_)
->InitDataReductionProxySettings(
io_data_->data_reduction_proxy_io_data(), profile_->GetPrefs(),
profile_->GetRequestContext(), std::move(store),
BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
db_task_runner);
+ chrome_browser_net::UINetworkQualityEstimatorServiceFactory::GetForProfile(
+ profile_)
+ ->Initialize(BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
mmenke 2016/07/14 19:10:12 Any reason not to just register the factory in chr
RyanSturm 2016/07/14 21:42:12 I can register the factory in chrome_browser_main_
mmenke 2016/07/18 21:34:18 The first lazy consumer is probably going to be cr
}
content::ResourceContext*
ProfileImplIOData::Handle::GetResourceContext() const {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
LazyInitialize();
return GetResourceContextNoInit();
}
content::ResourceContext*

Powered by Google App Engine
This is Rietveld 408576698