OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_RESOURCE_TRACKER_OBSERVER_STUB_
H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_RESOURCE_TRACKER_OBSERVER_STUB_
H_ |
| 7 |
| 8 #include "components/offline_pages/core/background/resource_data_type.h" |
| 9 #include "components/offline_pages/core/background/resource_tracker_observer.h" |
| 10 |
| 11 namespace offline_pages { |
| 12 |
| 13 class ResourceTrackerObserverStub : public ResourceTrackerObserver { |
| 14 public: |
| 15 ResourceTrackerObserverStub(); |
| 16 |
| 17 ~ResourceTrackerObserverStub(); |
| 18 |
| 19 // When we are notified of a resource load starting or ending, pass the |
| 20 // information along to the offliner. |
| 21 void ObserveResourceTracking(const ResourceDataType type, |
| 22 int64_t started_count, |
| 23 int64_t completed_count) override; |
| 24 |
| 25 // Returns the most recently seen counts for a specific resource type. |
| 26 void GetResourcePercentageCounts(const ResourceDataType type, |
| 27 int64_t* started, |
| 28 int64_t* completed); |
| 29 |
| 30 private: |
| 31 int64_t images_started_; |
| 32 int64_t images_completed_; |
| 33 }; |
| 34 |
| 35 } // namespace offline_pages |
| 36 |
| 37 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_RESOURCE_TRACKER_OBSERVER_ST
UBH_ |
OLD | NEW |