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

Unified Diff: chrome/browser/dom_distiller/tab_utils.cc

Issue 396743002: Remove redundant WebContents field in WebContentsObserver implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_distiller/tab_utils.cc
diff --git a/chrome/browser/dom_distiller/tab_utils.cc b/chrome/browser/dom_distiller/tab_utils.cc
index 1fbcd3f4775a0b8d0cbf16251ab6f9ad8264217a..7ddd29ccebbadbb5680a450aa99796850a4cc86b 100644
--- a/chrome/browser/dom_distiller/tab_utils.cc
+++ b/chrome/browser/dom_distiller/tab_utils.cc
@@ -61,9 +61,6 @@ class SelfDeletingRequestDelegate : public ViewRequestDelegate,
// The handle to the view request towards the DomDistillerService. It
// needs to be kept around to ensure the distillation request finishes.
scoped_ptr<ViewerHandle> viewer_handle_;
-
- // The WebContents this class is tracking.
- content::WebContents* web_contents_;
};
void SelfDeletingRequestDelegate::DidNavigateMainFrame(
@@ -83,12 +80,10 @@ void SelfDeletingRequestDelegate::WebContentsDestroyed() {
SelfDeletingRequestDelegate::SelfDeletingRequestDelegate(
content::WebContents* web_contents)
- : web_contents_(web_contents) {
- content::WebContentsObserver::Observe(web_contents_);
+ : WebContentsObserver(web_contents) {
}
SelfDeletingRequestDelegate::~SelfDeletingRequestDelegate() {
- content::WebContentsObserver::Observe(NULL);
}
void SelfDeletingRequestDelegate::OnArticleReady(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698