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

Side by Side Diff: chrome/browser/android/offline_pages/request_coordinator_factory.cc

Issue 2888273003: [Offline Pages] Add an observer for requests in the CCT namespace. (Closed)
Patch Set: comments. Created 3 years, 7 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/android/offline_pages/cct_request_observer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/android/offline_pages/request_coordinator_factory.h" 5 #include "chrome/browser/android/offline_pages/request_coordinator_factory.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
11 #include "base/sequenced_task_runner.h" 11 #include "base/sequenced_task_runner.h"
12 #include "base/task_scheduler/post_task.h" 12 #include "base/task_scheduler/post_task.h"
13 #include "chrome/browser/android/offline_pages/background_scheduler_bridge.h" 13 #include "chrome/browser/android/offline_pages/background_scheduler_bridge.h"
14 #include "chrome/browser/android/offline_pages/cct_request_observer.h"
14 #include "chrome/browser/android/offline_pages/downloads/offline_page_notificati on_bridge.h" 15 #include "chrome/browser/android/offline_pages/downloads/offline_page_notificati on_bridge.h"
15 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" 16 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
16 #include "chrome/browser/android/offline_pages/prerendering_offliner.h" 17 #include "chrome/browser/android/offline_pages/prerendering_offliner.h"
17 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h" 18 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
18 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h" 19 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h"
19 #include "chrome/browser/offline_pages/background_loader_offliner.h" 20 #include "chrome/browser/offline_pages/background_loader_offliner.h"
20 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/common/chrome_constants.h" 22 #include "chrome/common/chrome_constants.h"
22 #include "components/keyed_service/content/browser_context_dependency_manager.h" 23 #include "components/keyed_service/content/browser_context_dependency_manager.h"
23 #include "components/offline_pages/core/background/offliner.h" 24 #include "components/offline_pages/core/background/offliner.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 network_quality_estimator = 83 network_quality_estimator =
83 UINetworkQualityEstimatorServiceFactory::GetForProfile(profile); 84 UINetworkQualityEstimatorServiceFactory::GetForProfile(profile);
84 RequestCoordinator* request_coordinator = new RequestCoordinator( 85 RequestCoordinator* request_coordinator = new RequestCoordinator(
85 std::move(policy), std::move(offliner), std::move(queue), 86 std::move(policy), std::move(offliner), std::move(queue),
86 std::move(scheduler), network_quality_estimator); 87 std::move(scheduler), network_quality_estimator);
87 88
88 DownloadNotifyingObserver::CreateAndStartObserving( 89 DownloadNotifyingObserver::CreateAndStartObserving(
89 request_coordinator, 90 request_coordinator,
90 base::MakeUnique<android::OfflinePageNotificationBridge>()); 91 base::MakeUnique<android::OfflinePageNotificationBridge>());
91 92
93 CCTRequestObserver::AttachToRequestCoordinator(request_coordinator);
94
92 return request_coordinator; 95 return request_coordinator;
93 } 96 }
94 97
95 } // namespace offline_pages 98 } // namespace offline_pages
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/cct_request_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698