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

Unified Diff: chrome/browser/bookmarks/bookmark_manager_extension_api.cc

Issue 10945010: Switch BookmarkTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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/component/web_contents_delegate_android/web_contents_delegate_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_manager_extension_api.cc
diff --git a/chrome/browser/bookmarks/bookmark_manager_extension_api.cc b/chrome/browser/bookmarks/bookmark_manager_extension_api.cc
index 43e3b4d9dbd4ebf2dc43386561db261ea2bcff41..85f9b40a8e08f16a1a6f1aa3ffe2fb0735de0234 100644
--- a/chrome/browser/bookmarks/bookmark_manager_extension_api.cc
+++ b/chrome/browser/bookmarks/bookmark_manager_extension_api.cc
@@ -158,12 +158,16 @@ BookmarkManagerExtensionEventRouter::BookmarkManagerExtensionEventRouter(
Profile* profile, TabContents* tab)
: profile_(profile),
tab_(tab) {
- tab_->bookmark_tab_helper()->SetBookmarkDragDelegate(this);
+ BookmarkTabHelper* bookmark_tab_helper =
+ BookmarkTabHelper::FromWebContents(tab_->web_contents());
+ bookmark_tab_helper->SetBookmarkDragDelegate(this);
}
BookmarkManagerExtensionEventRouter::~BookmarkManagerExtensionEventRouter() {
- if (tab_->bookmark_tab_helper()->GetBookmarkDragDelegate() == this)
- tab_->bookmark_tab_helper()->SetBookmarkDragDelegate(NULL);
+ BookmarkTabHelper* bookmark_tab_helper =
+ BookmarkTabHelper::FromWebContents(tab_->web_contents());
+ if (bookmark_tab_helper->GetBookmarkDragDelegate() == this)
+ bookmark_tab_helper->SetBookmarkDragDelegate(NULL);
}
void BookmarkManagerExtensionEventRouter::DispatchEvent(
« no previous file with comments | « no previous file | chrome/browser/component/web_contents_delegate_android/web_contents_delegate_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698