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

Side by Side Diff: chrome/browser/loader/resource_tracker_observer.h

Issue 2933193003: Headers for resource tracking. (Closed)
Patch Set: Update build file and ensure proper enabling of offline code. Created 3 years, 6 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 CHROME_BROWSER_LOADER_RESOURCE_TRACKER_OBSERVER_H_
6 #define CHROME_BROWSER_LOADER_RESOURCE_TRACKER_OBSERVER_H_
7
8 #include <stdint.h>
9
10 // This interface is used by clients who want to be notified when a resource is
11 // requested or completes loading, and to report the size of the resource.
12 class ResourceTrackerObserver {
Dmitry Titov 2017/06/14 19:56:37 Naming: This is an observer of resource loading. M
Dmitry Titov 2017/06/14 19:56:37 Since this is going to be used by OfflinePages, sh
Pete Williamson 2017/06/15 01:03:27 Done.
Pete Williamson 2017/06/15 01:03:27 Done.
13 public:
14 enum ResourceDataType {
15 APPLICATION,
16 MEDIA,
17 EXAMPLE,
18 IMAGE,
19 MESSAGE,
20 MODEL,
Dmitry Titov 2017/06/14 19:56:37 Similarly, lets just have the types we are going t
Pete Williamson 2017/06/15 01:03:27 Done.
21 MULTIPART,
22 TEXT_CSS,
23 TEXT_HTML,
24 TEXT_PLAIN,
25 TEXT_SCRIPT,
26 XHR,
27 OTHER,
28 RESOURCE_DATA_TYPE_COUNT,
29 };
30
31 // Report when a resource starts or completes loading.
32 virtual void ObserveResourceTracking(ResourceDataType type, bool started) = 0;
33
34 // Report how many bytes were received for a resource.
35 virtual void OnNetworkBytesChanged(int64_t received_bytes) = 0;
36 };
37
38 #endif // CHROME_BROWSER_LOADER_RESOURCE_TRACKER_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698