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

Unified Diff: chrome/browser/apps/app_window_registry_util.cc

Issue 800473006: Don't include hidden windows in IsAppWindowRegisteredInAnyProfile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handle window_type_mask == 0 case. Created 5 years, 11 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: chrome/browser/apps/app_window_registry_util.cc
diff --git a/chrome/browser/apps/app_window_registry_util.cc b/chrome/browser/apps/app_window_registry_util.cc
index d6917ce868b4d658241df90a2d1484c45263297d..de5a661d2c8d32f72b0b75a41b52d875833d49f3 100644
--- a/chrome/browser/apps/app_window_registry_util.cc
+++ b/chrome/browser/apps/app_window_registry_util.cc
@@ -57,13 +57,12 @@ bool AppWindowRegistryUtil::IsAppWindowRegisteredInAnyProfile(
if (app_windows.empty())
continue;
- if (window_type_mask == 0)
- return true;
-
for (AppWindowList::const_iterator j = app_windows.begin();
tapted 2015/01/06 00:51:28 oooh range-based-for!
jackhou1 2015/01/06 02:13:14 Done.
j != app_windows.end(); ++j) {
- if ((*j)->window_type() & window_type_mask)
+ if (!(*j)->is_hidden() &&
+ (window_type_mask == 0 || (*j)->window_type() & window_type_mask)) {
tapted 2015/01/06 00:51:28 nit: brackets around the bitwise '&'
jackhou1 2015/01/06 02:13:14 Done.
return true;
+ }
}
}
« 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