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

Unified Diff: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc

Issue 2934043002: Use ContainsValue() instead of std::find() in chrome/browser/chromeos (Closed)
Patch Set: Fixed compilation error. 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: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc
diff --git a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc
index 89a2508e76f51c30ef1e02d30af52a10d77c9cc0..51ceec09ead2b5c0e47c16d96e6f289e9838f8b6 100644
--- a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc
+++ b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc
@@ -7,7 +7,6 @@
#include <keyhi.h>
#include <stdint.h>
-#include <algorithm>
#include <memory>
#include <string>
#include <utility>
@@ -17,6 +16,7 @@
#include "base/callback.h"
#include "base/command_line.h"
#include "base/memory/ptr_util.h"
+#include "base/stl_util.h"
#include "base/task_scheduler/post_task.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/thread_checker.h"
@@ -421,11 +421,8 @@ void OwnerSettingsServiceChromeOS::FixupLocalOwnerPolicy(
settings->mutable_allow_new_users()->set_allow_new_users(true);
em::UserWhitelistProto* whitelist_proto = settings->mutable_user_whitelist();
- if (whitelist_proto->user_whitelist().end() ==
- std::find(whitelist_proto->user_whitelist().begin(),
- whitelist_proto->user_whitelist().end(), user_id)) {
+ if (!base::ContainsValue(whitelist_proto->user_whitelist(), user_id))
whitelist_proto->add_user_whitelist(user_id);
- }
}
// static
« no previous file with comments | « chrome/browser/chromeos/mobile_config.cc ('k') | chrome/browser/chromeos/policy/server_backed_state_keys_broker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698