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

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

Issue 2866643005: [Offline pages] Stop observing web contents and reset to null after use. Only create a new web cont… (Closed)
Patch Set: 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 bc83a224a8805a5528a8ec2b1cf32f237eca7937..ff4b745a6c26337b69358e0914fa1b5fa4ef27cc 100644
--- a/chrome/browser/android/offline_pages/background_loader_offliner.h
+++ b/chrome/browser/android/offline_pages/background_loader_offliner.h
@@ -63,8 +63,8 @@ class BackgroundLoaderOffliner : public Offliner,
void OnNetworkBytesChanged(int64_t bytes);
protected:
- // Called to reset internal loader and observer state.
- virtual void ResetState();
+ // Called to reset the loader.
+ virtual void ResetLoader();
private:
friend class TestBackgroundLoaderOffliner;
@@ -75,6 +75,12 @@ class BackgroundLoaderOffliner : public Offliner,
// Called when the page has been saved.
void OnPageSaved(SavePageResult save_result, int64_t offline_id);
+ // Called to reset internal loader and observer state.
+ void ResetState();
+
+ // Called to attach 'this' as the observer to the loader.
+ void AttachObservers();
+
// Called when application state has changed.
void OnApplicationStateChange(
base::android::ApplicationState application_state);

Powered by Google App Engine
This is Rietveld 408576698