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

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

Issue 2782713002: Correct UIApplicationState check for sad tab test. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index b5e12d3765c2add415dff86d912e2a3beaf136a6..ec5ea753207215d46c425e232eb606079ff31195 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -1913,8 +1913,8 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
RendererTerminationTabState tab_state =
visible_ ? RendererTerminationTabState::FOREGROUND_TAB_FOREGROUND_APP
: RendererTerminationTabState::BACKGROUND_TAB_FOREGROUND_APP;
- if ([UIApplication sharedApplication].applicationState ==
- UIApplicationStateBackground) {
+ if ([UIApplication sharedApplication].applicationState !=
+ UIApplicationStateActive) {
tab_state =
visible_ ? RendererTerminationTabState::FOREGROUND_TAB_BACKGROUND_APP
: RendererTerminationTabState::BACKGROUND_TAB_BACKGROUND_APP;
@@ -1928,8 +1928,8 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
}
BOOL applicationIsBackgrounded =
pkl (ping after 24h if needed) 2017/03/29 14:28:01 nit: Can we rename this var to isNotActive or appI
justincohen 2017/03/29 15:23:37 Done.
- [UIApplication sharedApplication].applicationState ==
- UIApplicationStateBackground;
+ [UIApplication sharedApplication].applicationState !=
+ UIApplicationStateActive;
if (visible_) {
if (!applicationIsBackgrounded) {
base::WeakNSObject<Tab> weakSelf(self);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698