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

Unified Diff: chrome/browser/chromeos/policy/server_backed_state_keys_broker.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
« no previous file with comments | « chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/server_backed_state_keys_broker.cc
diff --git a/chrome/browser/chromeos/policy/server_backed_state_keys_broker.cc b/chrome/browser/chromeos/policy/server_backed_state_keys_broker.cc
index 9763f2fc74058265a65a3df6a81f3c46e13dcef0..db32df02bddfece4dfa5517c6e52b6dd2d472dac 100644
--- a/chrome/browser/chromeos/policy/server_backed_state_keys_broker.cc
+++ b/chrome/browser/chromeos/policy/server_backed_state_keys_broker.cc
@@ -4,10 +4,9 @@
#include "chrome/browser/chromeos/policy/server_backed_state_keys_broker.h"
-#include <algorithm>
-
#include "base/bind.h"
#include "base/location.h"
+#include "base/stl_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chromeos/dbus/session_manager_client.h"
@@ -76,8 +75,7 @@ void ServerBackedStateKeysBroker::StoreStateKeys(
initial_retrieval_completed_ = true;
if (state_keys.empty()) {
LOG(WARNING) << "Failed to obtain server-backed state keys.";
- } else if (state_keys.end() !=
- std::find(state_keys.begin(), state_keys.end(), std::string())) {
+ } else if (base::ContainsValue(state_keys, std::string())) {
LOG(WARNING) << "Bad state keys.";
} else {
send_notification |= state_keys_ != state_keys;
« no previous file with comments | « chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698