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

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

Issue 1715683002: chrome: Use base's ContainsValue helper function instead of std::find (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per latest code 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
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 2911322e07be5b731095f775f7b1106f87ca43a5..adce2d235e526be23a7d8bfaa0432cfb0468b976 100644
--- a/chrome/browser/apps/app_window_registry_util.cc
+++ b/chrome/browser/apps/app_window_registry_util.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/stl_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -85,9 +86,7 @@ void AppWindowRegistryUtil::CloseAllAppWindows() {
AppWindowList window_list_copy(registry->app_windows());
for (const auto& window : window_list_copy) {
// Ensure window is still valid.
- if (std::find(registry->app_windows().begin(),
- registry->app_windows().end(),
- window) != registry->app_windows().end())
+ if (ContainsValue(registry->app_windows(), window))
window->GetBaseWindow()->Close();
}
}

Powered by Google App Engine
This is Rietveld 408576698