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

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

Issue 2857063002: Add a way to send the resource percentage signal to the RC. (Closed)
Patch Set: CR Feedback per Dimich, BMcQuade, and CSHarrison 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698