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

Unified Diff: chrome/browser/offline_pages/resource_loading_observer.h

Issue 2933193003: Headers for resource tracking. (Closed)
Patch Set: CR feedback from RyanSturm 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/offline_pages/offliner_user_data.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/offline_pages/resource_loading_observer.h
diff --git a/chrome/browser/offline_pages/resource_loading_observer.h b/chrome/browser/offline_pages/resource_loading_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a6e90dc8a595f37b71ffa414a3718800279f749
--- /dev/null
+++ b/chrome/browser/offline_pages/resource_loading_observer.h
@@ -0,0 +1,32 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_OFFLINE_PAGES_RESOURCE_LOADING_OBSERVER_H_
+#define CHROME_BROWSER_OFFLINE_PAGES_RESOURCE_LOADING_OBSERVER_H_
+
+#include <stdint.h>
+
+namespace offline_pages {
+
+// This interface is used by clients who want to be notified when a resource is
+// requested or completes loading, and to report the size of the resource.
+class ResourceLoadingObserver {
+ public:
+ enum ResourceDataType {
+ IMAGE,
+ TEXT_CSS,
+ OTHER,
+ RESOURCE_DATA_TYPE_COUNT,
+ };
+
+ // Report when a resource starts or completes loading.
+ virtual void ObserveResourceLoading(ResourceDataType type, bool started) = 0;
+
+ // Report how many bytes were received for a resource.
+ virtual void OnNetworkBytesChanged(int64_t received_bytes) = 0;
+};
+
+} // namespace offline_pages
+
+#endif // CHROME_BROWSER_OFFLINE_PAGES_RESOURCE_LOADING_OBSERVER_H_
« no previous file with comments | « chrome/browser/offline_pages/offliner_user_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698