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

Side by Side Diff: components/offline_pages/core/background/request_coordinator.h

Issue 2840083002: Add UMA for network type at request start (Closed)
Patch Set: Rebase to remove superflous change in prerendering_offliner Created 3 years, 8 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 | « no previous file | components/offline_pages/core/background/request_coordinator.cc » ('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 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 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REQUEST_COORDINATOR_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REQUEST_COORDINATOR_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REQUEST_COORDINATOR_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REQUEST_COORDINATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 std::unique_ptr<OfflinerPolicy> policy_; 436 std::unique_ptr<OfflinerPolicy> policy_;
437 // RequestQueue. Used to store incoming requests. Owned. 437 // RequestQueue. Used to store incoming requests. Owned.
438 std::unique_ptr<RequestQueue> queue_; 438 std::unique_ptr<RequestQueue> queue_;
439 // Scheduler. Used to request a callback when network is available. Owned. 439 // Scheduler. Used to request a callback when network is available. Owned.
440 std::unique_ptr<Scheduler> scheduler_; 440 std::unique_ptr<Scheduler> scheduler_;
441 // Controller of client policies. Owned. 441 // Controller of client policies. Owned.
442 std::unique_ptr<ClientPolicyController> policy_controller_; 442 std::unique_ptr<ClientPolicyController> policy_controller_;
443 // Unowned pointer to the Network Quality Estimator. 443 // Unowned pointer to the Network Quality Estimator.
444 net::NetworkQualityEstimator::NetworkQualityProvider* 444 net::NetworkQualityEstimator::NetworkQualityProvider*
445 network_quality_estimator_; 445 network_quality_estimator_;
446 net::EffectiveConnectionType network_quality_at_request_start_;
446 // Holds an ID of the currently active request. 447 // Holds an ID of the currently active request.
447 int64_t active_request_id_; 448 int64_t active_request_id_;
448 // Status of the most recent offlining. 449 // Status of the most recent offlining.
449 Offliner::RequestStatus last_offlining_status_; 450 Offliner::RequestStatus last_offlining_status_;
450 // A set of request_ids that we are holding off until the download manager is 451 // A set of request_ids that we are holding off until the download manager is
451 // done with them. 452 // done with them.
452 std::set<int64_t> disabled_requests_; 453 std::set<int64_t> disabled_requests_;
453 // The processing callback to call when processing the current processing 454 // The processing callback to call when processing the current processing
454 // window stops. It is set from the Start*Processing() call that triggered 455 // window stops. It is set from the Start*Processing() call that triggered
455 // the processing or it may be the |internal_start_processing_callback_| if 456 // the processing or it may be the |internal_start_processing_callback_| if
(...skipping 21 matching lines...) Expand all
477 std::deque<int64_t> prioritized_requests_; 478 std::deque<int64_t> prioritized_requests_;
478 // Allows us to pass a weak pointer to callbacks. 479 // Allows us to pass a weak pointer to callbacks.
479 base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_; 480 base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_;
480 481
481 DISALLOW_COPY_AND_ASSIGN(RequestCoordinator); 482 DISALLOW_COPY_AND_ASSIGN(RequestCoordinator);
482 }; 483 };
483 484
484 } // namespace offline_pages 485 } // namespace offline_pages
485 486
486 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REQUEST_COORDINATOR_H_ 487 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_REQUEST_COORDINATOR_H_
OLDNEW
« no previous file with comments | « no previous file | components/offline_pages/core/background/request_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698