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

Unified Diff: extensions/browser/app_window/app_window_registry.cc

Issue 2950263003: Use ContainsValue() instead of std::find() in extensions/ (Closed)
Patch Set: Rebase patch. Created 3 years, 6 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 | « extensions/browser/api/web_request/web_request_api.cc ('k') | extensions/common/extension_l10n_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « extensions/browser/api/web_request/web_request_api.cc ('k') | extensions/common/extension_l10n_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698