Index: chrome/browser/android/offline_pages/request_coordinator_factory.cc |
diff --git a/chrome/browser/android/offline_pages/request_coordinator_factory.cc b/chrome/browser/android/offline_pages/request_coordinator_factory.cc |
index f453dd2c1fe01b9121165cb27478f90f439c110a..f99ffc78de8925f6bf1ccaf2ff18739a95bc6534 100644 |
--- a/chrome/browser/android/offline_pages/request_coordinator_factory.cc |
+++ b/chrome/browser/android/offline_pages/request_coordinator_factory.cc |
@@ -12,6 +12,8 @@ |
#include "chrome/browser/android/offline_pages/background_scheduler_bridge.h" |
#include "chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.h" |
#include "chrome/browser/android/offline_pages/prerendering_offliner_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/profiles/profile.h" |
#include "chrome/common/chrome_constants.h" |
#include "components/keyed_service/content/browser_context_dependency_manager.h" |
@@ -24,6 +26,7 @@ |
#include "components/offline_pages/background/scheduler.h" |
#include "components/offline_pages/downloads/download_notifying_observer.h" |
#include "content/public/browser/browser_thread.h" |
+#include "net/nqe/network_quality_estimator.h" |
namespace offline_pages { |
@@ -53,20 +56,23 @@ KeyedService* RequestCoordinatorFactory::BuildServiceInstanceFor( |
scoped_refptr<base::SequencedTaskRunner> background_task_runner = |
content::BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( |
content::BrowserThread::GetBlockingPool()->GetSequenceToken()); |
+ Profile* profile = Profile::FromBrowserContext(context); |
base::FilePath queue_store_path = |
- Profile::FromBrowserContext(context)->GetPath().Append( |
- chrome::kOfflinePageRequestQueueDirname); |
+ profile->GetPath().Append(chrome::kOfflinePageRequestQueueDirname); |
std::unique_ptr<RequestQueueStoreSQL> queue_store( |
new RequestQueueStoreSQL(background_task_runner, queue_store_path)); |
std::unique_ptr<RequestQueue> queue(new RequestQueue(std::move(queue_store))); |
std::unique_ptr<Scheduler> |
scheduler(new android::BackgroundSchedulerBridge()); |
+ net::NetworkQualityEstimator::NetworkQualityProvider* nqe = |
Pete Williamson
2016/09/16 22:26:01
nqe -> network_quality_estimator or network_qualit
dougarnett
2016/09/19 19:34:32
Done.
|
+ static_cast<net::NetworkQualityEstimator::NetworkQualityProvider*>( |
tbansal1
2016/09/16 22:05:55
Curious: Is there a reason to do explicit static_c
dougarnett
2016/09/19 19:34:32
Done.
|
+ UINetworkQualityEstimatorServiceFactory::GetForProfile(profile)); |
// TODO(fgorski): Something needs to keep the handle to the Notification |
// dispatcher. |
RequestCoordinator* request_coordinator = |
new RequestCoordinator(std::move(policy), std::move(prerenderer_offliner), |
- std::move(queue), std::move(scheduler)); |
+ std::move(queue), std::move(scheduler), nqe); |
DownloadNotifyingObserver::CreateAndStartObserving( |
request_coordinator, |