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

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

Issue 103213015: Pass through the parent_tab_id when creating a new tab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated the unittest Created 6 years, 11 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/ui/android/tab_model/tab_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore_android.cc
diff --git a/chrome/browser/sessions/session_restore_android.cc b/chrome/browser/sessions/session_restore_android.cc
index 12527b989fcba999a29498d41f6cc072f442c175..95e772c01e9caf66c3952d9b7cd49e37635cc79a 100644
--- a/chrome/browser/sessions/session_restore_android.cc
+++ b/chrome/browser/sessions/session_restore_android.cc
@@ -39,15 +39,15 @@ content::WebContents* SessionRestore::RestoreForeignSessionTab(
content::NavigationController::RESTORE_LAST_SESSION_EXITED_CLEANLY,
&entries);
+ TabAndroid* current_tab = TabAndroid::FromWebContents(web_contents);
+ DCHECK(current_tab);
if (disposition == CURRENT_TAB) {
- TabAndroid* current_tab = TabAndroid::FromWebContents(web_contents);
- DCHECK(current_tab);
current_tab->SwapTabContents(web_contents, new_web_contents);
delete web_contents;
} else {
DCHECK(disposition == NEW_FOREGROUND_TAB ||
disposition == NEW_BACKGROUND_TAB);
- tab_model->CreateTab(new_web_contents);
+ tab_model->CreateTab(new_web_contents, current_tab->GetAndroidId());
}
return new_web_contents;
}
« no previous file with comments | « no previous file | chrome/browser/ui/android/tab_model/tab_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698