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

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

Issue 2857063002: Add a way to send the resource percentage signal to the RC. (Closed)
Patch Set: Move OfflinerUserData to its new home in chrome/browser/offline_pages 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/offline_pages/background_loader_offliner.h
diff --git a/chrome/browser/offline_pages/background_loader_offliner.h b/chrome/browser/offline_pages/background_loader_offliner.h
index cab1a501d94d03c14cc9f975a9882390134aff73..26ed7f98c4b38a0bb8ce5f9aa26c3ad4bad84e0a 100644
--- a/chrome/browser/offline_pages/background_loader_offliner.h
+++ b/chrome/browser/offline_pages/background_loader_offliner.h
@@ -12,6 +12,7 @@
#include "base/values.h"
#include "components/offline_pages/content/background_loader/background_loader_contents.h"
#include "components/offline_pages/core/background/offliner.h"
+#include "components/offline_pages/core/background/resource_data_type.h"
#include "components/offline_pages/core/offline_page_types.h"
#include "components/offline_pages/core/snapshot_controller.h"
#include "content/public/browser/web_contents_observer.h"
@@ -46,6 +47,9 @@ class BackgroundLoaderOffliner : public Offliner,
const ProgressCallback& progress_callback) override;
bool Cancel(const CancelCallback& callback) override;
bool HandleTimeout(int64_t request_id) override;
+ void ObserveResourceTracking(const ResourceDataType type,
+ int64_t started_count,
+ int64_t completed_count) override;
// WebContentsObserver implementation.
void DocumentAvailableInMainFrame() override;
@@ -93,6 +97,10 @@ class BackgroundLoaderOffliner : public Offliner,
void DeleteOfflinePageCallback(const SavePageRequest& request,
DeletePageResult result);
+ // Add a resource loading signal as we observe it.
+ void AddResourceSignal(const ResourceDataType type,
+ int64_t started_count,
+ int64_t completed_count);
std::unique_ptr<background_loader::BackgroundLoaderContents> loader_;
// Not owned.

Powered by Google App Engine
This is Rietveld 408576698