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

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

Issue 2819393002: Collect loading signal data from the background loader offliner (Closed)
Patch Set: Add comment about why we use a double. Created 3 years, 8 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 | « no previous file | chrome/browser/android/offline_pages/background_loader_offliner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25378b73e41864d594e793efe253f50f4c63f74d..a09d611b19f145cddb1f969496dcb2a908ac2f34 100644
--- a/chrome/browser/android/offline_pages/background_loader_offliner.h
+++ b/chrome/browser/android/offline_pages/background_loader_offliner.h
@@ -9,6 +9,7 @@
#include "base/android/application_status_listener.h"
#include "base/memory/weak_ptr.h"
+#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/offline_page_types.h"
@@ -79,6 +80,12 @@ class BackgroundLoaderOffliner : public Offliner,
void HandleApplicationStateChangeCancel(const SavePageRequest& request,
int64_t offline_id);
+ // Called to remember at what time we started loading.
+ void MarkLoadStartTime();
+
+ // Called to add a loading signal as we observe it.
+ void AddLoadingSignal(const char* signal_name);
+
std::unique_ptr<background_loader::BackgroundLoaderContents> loader_;
// Not owned.
content::BrowserContext* browser_context_;
@@ -112,6 +119,13 @@ class BackgroundLoaderOffliner : public Offliner,
// Whether the snapshot is on the last retry.
bool did_snapshot_on_last_retry_;
+ // Time in ticks of when we start loading the page.
+ base::TimeTicks load_start_time_;
+
+ // Saves loading signals.
+ // TODO(petewil): We will be replacing this with the new snapshot controller.
+ base::DictionaryValue signal_data_;
+
// Callback for cancel.
CancelCallback cancel_callback_;
« no previous file with comments | « no previous file | chrome/browser/android/offline_pages/background_loader_offliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698