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

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

Issue 2857063002: Add a way to send the resource percentage signal to the RC. (Closed)
Patch Set: Make sure we don't send notifications unless we are offlining 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/android/offline_pages/background_loader_offliner.h
diff --git a/chrome/browser/android/offline_pages/background_loader_offliner.h b/chrome/browser/android/offline_pages/background_loader_offliner.h
index ff4b745a6c26337b69358e0914fa1b5fa4ef27cc..1ed95c6ad3e034250a8dc45d4aae8da14f0f7843 100644
--- a/chrome/browser/android/offline_pages/background_loader_offliner.h
+++ b/chrome/browser/android/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