| Index: chrome/browser/android/offline_pages/prerendering_loader.h
|
| diff --git a/chrome/browser/android/offline_pages/prerendering_loader.h b/chrome/browser/android/offline_pages/prerendering_loader.h
|
| index 7e45fef375163996eddbae437e53c3363f45719d..572f97b3c98d62181af9bd70bbc1740d8a82180a 100644
|
| --- a/chrome/browser/android/offline_pages/prerendering_loader.h
|
| +++ b/chrome/browser/android/offline_pages/prerendering_loader.h
|
| @@ -6,6 +6,8 @@
|
| #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_LOADER_H_
|
|
|
| #include <memory>
|
| +#include <string>
|
| +#include <vector>
|
|
|
| #include "base/callback.h"
|
| #include "chrome/browser/android/offline_pages/prerender_adapter.h"
|
| @@ -82,6 +84,11 @@ class PrerenderingLoader : public PrerenderAdapter::Observer,
|
| // Returns true if the lowbar of snapshotting a page is met.
|
| virtual bool IsLowbarMet();
|
|
|
| + // Returns a vector of strings for analysis of loading progress.
|
| + const std::vector<std::string>& GetLoadingSignalData() {
|
| + return signal_data_;
|
| + }
|
| +
|
| private:
|
| // State of the loader (only one request may be active at a time).
|
| enum class State {
|
| @@ -104,6 +111,9 @@ class PrerenderingLoader : public PrerenderAdapter::Observer,
|
| // Cancels any current prerender and moves loader to idle state.
|
| void CancelPrerender();
|
|
|
| + // Add a signal to the signal data.
|
| + void AddLoadingSignal(const char* signal_name);
|
| +
|
| // Tracks loading state including whether the Loader is idle.
|
| State state_;
|
|
|
| @@ -120,6 +130,9 @@ class PrerenderingLoader : public PrerenderAdapter::Observer,
|
| // storage namespace for rendering. This will NOT have the loaded page.
|
| std::unique_ptr<content::WebContents> session_contents_;
|
|
|
| + // Signal data collected for this rendering attempt
|
| + std::vector<std::string> signal_data_;
|
| +
|
| // Callback to call when the active load request completes, fails, or is
|
| // canceled.
|
| LoadPageCallback load_done_callback_;
|
|
|