Index: extensions/browser/app_window/app_window_registry.cc |
diff --git a/extensions/browser/app_window/app_window_registry.cc b/extensions/browser/app_window/app_window_registry.cc |
index bd259b0ba1e150c6e31efebe26762f7bd88747a7..1eb972f5da8a08be432cfee67278b8e2261c2085 100644 |
--- a/extensions/browser/app_window/app_window_registry.cc |
+++ b/extensions/browser/app_window/app_window_registry.cc |
@@ -7,6 +7,7 @@ |
#include <string> |
#include <vector> |
+#include "base/stl_util.h" |
#include "base/strings/stringprintf.h" |
#include "components/keyed_service/content/browser_context_dependency_manager.h" |
#include "content/public/browser/browser_context.h" |
@@ -188,9 +189,7 @@ void AppWindowRegistry::DevToolsAgentHostDetached( |
} |
void AppWindowRegistry::AddAppWindowToList(AppWindow* app_window) { |
- const AppWindowList::iterator it = |
- std::find(app_windows_.begin(), app_windows_.end(), app_window); |
- if (it != app_windows_.end()) |
+ if (base::ContainsValue(app_windows_, app_window)) |
return; |
app_windows_.push_back(app_window); |
} |