| Index: ios/chrome/browser/tabs/tab.mm
|
| diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
|
| index 90ddf437ecb4d217afc81fff327f9c681f5491d4..d02457031e4168b51fbfd719b76b1923019d32ca 100644
|
| --- a/ios/chrome/browser/tabs/tab.mm
|
| +++ b/ios/chrome/browser/tabs/tab.mm
|
| @@ -100,6 +100,7 @@
|
| #import "ios/chrome/browser/web/navigation_manager_util.h"
|
| #import "ios/chrome/browser/web/passkit_dialog_provider.h"
|
| #include "ios/chrome/browser/web/print_observer.h"
|
| +#import "ios/chrome/browser/web/tab_id_tab_helper.h"
|
| #import "ios/chrome/browser/xcallback_parameters.h"
|
| #include "ios/chrome/grit/ios_strings.h"
|
| #import "ios/web/navigation/navigation_item_impl.h"
|
| @@ -155,10 +156,6 @@ class TabHistoryContext;
|
| class FaviconDriverObserverBridge;
|
| class TabInfoBarObserver;
|
|
|
| -// The key under which the Tab ID is stored in the WebState's serializable user
|
| -// data.
|
| -NSString* const kTabIDKey = @"TabID";
|
| -
|
| // Name of histogram for recording the state of the tab when the renderer is
|
| // terminated.
|
| const char kRendererTerminationStateHistogram[] =
|
| @@ -426,7 +423,6 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
|
| @implementation Tab
|
|
|
| @synthesize browserState = _browserState;
|
| -@synthesize tabId = tabId_;
|
| @synthesize useGreyImageCache = useGreyImageCache_;
|
| @synthesize isPrerenderTab = _isPrerenderTab;
|
| @synthesize isLinkLoadingPrerenderTab = isLinkLoadingPrerenderTab_;
|
| @@ -615,22 +611,7 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
|
| // tabId should be nil.
|
| return nil;
|
| }
|
| -
|
| - if (tabId_)
|
| - return tabId_;
|
| -
|
| - web::SerializableUserDataManager* userDataManager =
|
| - web::SerializableUserDataManager::FromWebState(self.webState);
|
| - NSString* tabId = base::mac::ObjCCast<NSString>(
|
| - userDataManager->GetValueForSerializationKey(kTabIDKey));
|
| -
|
| - if (!tabId || ![tabId length]) {
|
| - tabId = [[NSUUID UUID] UUIDString];
|
| - userDataManager->AddSerializableData(tabId, kTabIDKey);
|
| - }
|
| -
|
| - tabId_ = [tabId copy];
|
| - return tabId_;
|
| + return TabIDTabHelper::FromWebState(self.webState)->tab_id();
|
| }
|
|
|
| - (web::WebState*)webState {
|
|
|