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

Unified Diff: chrome/browser/sync/glue/session_change_processor.cc

Issue 10917026: Switch Extensions::TabHelper to use WebContents, WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only 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
Index: chrome/browser/sync/glue/session_change_processor.cc
diff --git a/chrome/browser/sync/glue/session_change_processor.cc b/chrome/browser/sync/glue/session_change_processor.cc
index 815220eba66d9720c0e35f3c7aff1e26006cb55a..2b98f6806c0322a85887a61ff426bac9d9e7df3a 100644
--- a/chrome/browser/sync/glue/session_change_processor.cc
+++ b/chrome/browser/sync/glue/session_change_processor.cc
@@ -181,14 +181,14 @@ void SessionChangeProcessor::Observe(
case chrome::NOTIFICATION_TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED: {
extensions::TabHelper* extension_tab_helper =
content::Source<extensions::TabHelper>(source).ptr();
- if (!extension_tab_helper ||
- extension_tab_helper->web_contents()->GetBrowserContext() !=
+ if (extension_tab_helper->web_contents()->GetBrowserContext() !=
profile_) {
return;
}
if (extension_tab_helper->extension_app()) {
- modified_tabs.push_back(extension_tab_helper->tab_contents()->
- synced_tab_delegate());
+ TabContents* tab_contents =
+ TabContents::FromWebContents(extension_tab_helper->web_contents());
+ modified_tabs.push_back(tab_contents->synced_tab_delegate());
}
DVLOG(1) << "Received TAB_CONTENTS_APPLICATION_EXTENSION_CHANGED "
<< "for profile " << profile_;
« no previous file with comments | « chrome/browser/sessions/tab_restore_service.cc ('k') | chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698