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

Unified Diff: chrome/browser/sessions/session_service.cc

Issue 10917198: Switch NOTIFICATION_TAB_PARENTED to use WebContents. (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 | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/sessions/session_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_service.cc
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index e78bebeaa3a7c517857c6ac29085cbeee63c429a..3e4961de0563f80ef2096aad199288abc8b8ebcf 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -604,10 +604,9 @@ void SessionService::Observe(int type,
}
case chrome::NOTIFICATION_TAB_PARENTED: {
- TabContents* tab = content::Source<TabContents>(source).ptr();
- if (tab->profile() != profile())
+ WebContents* web_contents = content::Source<WebContents>(source).ptr();
+ if (web_contents->GetBrowserContext() != profile())
return;
- WebContents* web_contents = tab->web_contents();
SessionTabHelper* session_tab_helper =
SessionTabHelper::FromWebContents(web_contents);
SetTabWindow(session_tab_helper->window_id(),
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/browser/sessions/session_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698