Index: ios/chrome/browser/test/perf_test_with_bvc_ios.mm |
diff --git a/ios/chrome/browser/test/perf_test_with_bvc_ios.mm b/ios/chrome/browser/test/perf_test_with_bvc_ios.mm |
index 146c521a2561eaea18f8de067fc7442b96feee95..d8a056cdd2c866a7cb9b2276e149f20395af740c 100644 |
--- a/ios/chrome/browser/test/perf_test_with_bvc_ios.mm |
+++ b/ios/chrome/browser/test/perf_test_with_bvc_ios.mm |
@@ -14,6 +14,7 @@ |
#include "ios/chrome/browser/bookmarks/bookmark_model_factory.h" |
#include "ios/chrome/browser/browser_state/test_chrome_browser_state_manager.h" |
#include "ios/chrome/browser/search_engines/template_url_service_factory.h" |
+#import "ios/chrome/browser/sessions/session_ios.h" |
#import "ios/chrome/browser/sessions/session_service_ios.h" |
#import "ios/chrome/browser/sessions/session_window_ios.h" |
#import "ios/chrome/browser/tabs/tab_model.h" |
@@ -118,17 +119,18 @@ void PerfTestWithBVC::SetUp() { |
// Use the session to create a window which will contain the tab models. |
NSString* state_path = base::SysUTF8ToNSString( |
chrome_browser_state_->GetStatePath().AsUTF8Unsafe()); |
- SessionWindowIOS* session_window = [[SessionServiceIOS sharedService] |
- loadSessionWindowFromDirectory:state_path]; |
+ SessionIOS* session = |
+ [[SessionServiceIOS sharedService] loadSessionFromDirectory:state_path]; |
+ DCHECK_EQ(session.sessionWindows.count, 1u); |
// Tab models. The off-the-record (OTR) tab model is required for the stack |
// view controller, which is created in OpenStackView(). |
tab_model_.reset([[TabModel alloc] |
- initWithSessionWindow:session_window |
+ initWithSessionWindow:session.sessionWindows[0] |
sessionService:[SessionServiceIOS sharedService] |
browserState:chrome_browser_state_.get()]); |
otr_tab_model_.reset([[TabModel alloc] |
- initWithSessionWindow:session_window |
+ initWithSessionWindow:session.sessionWindows[0] |
sessionService:[SessionServiceIOS sharedService] |
browserState:chrome_browser_state_ |
->GetOffTheRecordChromeBrowserState()]); |