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

Unified Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2755823002: Moved |openedByDOM| to WebState's CreateParams and public interface. (Closed)
Patch Set: . Created 3 years, 9 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_unittest.mm ('k') | ios/chrome/browser/ui/browser_view_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/browser_view_controller.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index e83a5c533d0229abb781bda7b73f1fea507fd3f9..2646f9ff7c33187338a2b38b269102db97fd9b76 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -172,7 +172,6 @@
#include "ios/public/provider/chrome/browser/voice/voice_search_controller.h"
#include "ios/public/provider/chrome/browser/voice/voice_search_controller_delegate.h"
#include "ios/public/provider/chrome/browser/voice/voice_search_provider.h"
-#import "ios/web/navigation/crw_session_controller.h"
#include "ios/web/navigation/navigation_manager_impl.h"
#include "ios/web/public/active_state_manager.h"
#include "ios/web/public/navigation_item.h"
@@ -2418,8 +2417,7 @@ - (void)closeWebState:(web::WebState*)webState {
// Only allow a web page to close itself if it was opened by DOM, or if there
// are no navigation items.
Tab* tab = LegacyTabHelper::GetTabForWebState(webState);
- DCHECK([[tab navigationManagerImpl]->GetSessionController() isOpenedByDOM] ||
- ![tab navigationManager]->GetItemCount());
+ DCHECK(webState->HasOpener() || ![tab navigationManager]->GetItemCount());
if (![self tabModel])
return;
« no previous file with comments | « ios/chrome/browser/tabs/tab_unittest.mm ('k') | ios/chrome/browser/ui/browser_view_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698