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

Unified Diff: ios/chrome/browser/tabs/tab_helper_util.mm

Issue 2956483003: [ios] TabIdTabHelper (Closed)
Patch Set: Additional unit tests and other edits. Created 3 years, 6 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 | « ios/chrome/browser/tabs/tab.mm ('k') | ios/chrome/browser/tabs/tab_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab_helper_util.mm
diff --git a/ios/chrome/browser/tabs/tab_helper_util.mm b/ios/chrome/browser/tabs/tab_helper_util.mm
index e266138bd93bc80c74bbeca8983c41c0768956af..bb1a60e7d87bc29bab2b4b5ed665f2fa37bb22a7 100644
--- a/ios/chrome/browser/tabs/tab_helper_util.mm
+++ b/ios/chrome/browser/tabs/tab_helper_util.mm
@@ -35,10 +35,14 @@
#import "ios/chrome/browser/web/network_activity_indicator_tab_helper.h"
#import "ios/chrome/browser/web/repost_form_tab_helper.h"
#import "ios/chrome/browser/web/sad_tab_tab_helper.h"
+#import "ios/chrome/browser/web/tab_id_tab_helper.h"
#import "ios/public/provider/chrome/browser/chrome_browser_provider.h"
#import "ios/web/public/web_state/web_state.h"
void AttachTabHelpers(web::WebState* web_state) {
+ // TabIdHelper sets up the tab ID which is required for the creation of the
+ // Tab by LegacyTabHelper.
+ TabIdTabHelper::CreateForWebState(web_state);
LegacyTabHelper::CreateForWebState(web_state);
Tab* tab = LegacyTabHelper::GetTabForWebState(web_state);
DCHECK(tab);
@@ -46,8 +50,8 @@ void AttachTabHelpers(web::WebState* web_state) {
ios::ChromeBrowserState* browser_state =
ios::ChromeBrowserState::FromBrowserState(web_state->GetBrowserState());
- // IOSChromeSessionTabHelper comes first because it sets up the tab ID,
- // and other helpers may rely on that.
+ // IOSChromeSessionTabHelper sets up the session ID used by other helpers,
+ // so it needs to be created before them.
IOSChromeSessionTabHelper::CreateForWebState(web_state);
NetworkActivityIndicatorTabHelper::CreateForWebState(web_state, tab.tabId);
« no previous file with comments | « ios/chrome/browser/tabs/tab.mm ('k') | ios/chrome/browser/tabs/tab_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698