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

Unified Diff: ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc

Issue 1675483002: Allow use of container cbegin() and cend() methods, plus sample uses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add note about non-member cbegin() and cend(). Created 4 years, 10 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 | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc
diff --git a/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc b/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc
index f5343ad5a2be6f75b4ab092604efe71f2c9ad105..46357f60f0093af2b1ee80265196eff9d348e21f 100644
--- a/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc
+++ b/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc
@@ -55,11 +55,9 @@ class MinimizeWaiter : public X11PropertyChangeWaiter {
bool ShouldKeepOnWaiting(const ui::PlatformEvent& event) override {
std::vector<Atom> wm_states;
if (ui::GetAtomArrayProperty(xwindow(), "_NET_WM_STATE", &wm_states)) {
- std::vector<Atom>::iterator it = std::find(
- wm_states.begin(),
- wm_states.end(),
- atom_cache_->GetAtom("_NET_WM_STATE_HIDDEN"));
- return it == wm_states.end();
+ auto it = std::find(wm_states.cbegin(), wm_states.cend(),
+ atom_cache_->GetAtom("_NET_WM_STATE_HIDDEN"));
+ return it == wm_states.cend();
}
return true;
}
@@ -97,9 +95,8 @@ class StackingClientListWaiter : public X11PropertyChangeWaiter {
std::vector<XID> stack;
ui::GetXWindowStack(ui::GetX11RootWindow(), &stack);
for (size_t i = 0; i < expected_windows_.size(); ++i) {
- std::vector<XID>::iterator it = std::find(
- stack.begin(), stack.end(), expected_windows_[i]);
- if (it == stack.end())
+ auto it = std::find(stack.cbegin(), stack.cend(), expected_windows_[i]);
+ if (it == stack.cend())
return true;
}
return false;
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698