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

Unified Diff: extensions/browser/api/management/management_api.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
Index: extensions/browser/api/management/management_api.cc
diff --git a/extensions/browser/api/management/management_api.cc b/extensions/browser/api/management/management_api.cc
index c9bf619301f194551be48e21319aa74ba8f82d92..57cbbd34e64fa71d2f3a041c12d24886d4b930b9 100644
--- a/extensions/browser/api/management/management_api.cc
+++ b/extensions/browser/api/management/management_api.cc
@@ -17,6 +17,7 @@
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram.h"
#include "base/single_thread_task_runner.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -706,8 +707,7 @@ ExtensionFunction::ResponseAction ManagementSetLaunchTypeFunction::Run() {
GetAvailableLaunchTypes(*extension, delegate);
management::LaunchType app_launch_type = params->launch_type;
- if (std::find(available_launch_types.begin(), available_launch_types.end(),
- app_launch_type) == available_launch_types.end()) {
+ if (!base::ContainsValue(available_launch_types, app_launch_type)) {
return RespondNow(Error(keys::kLaunchTypeNotAvailableError));
}
« no previous file with comments | « extensions/browser/api/document_scan/document_scan_api.cc ('k') | extensions/browser/api/socket/udp_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698