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

Unified Diff: chrome/browser/chromeos/mobile_config.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/mobile_config.cc
diff --git a/chrome/browser/chromeos/mobile_config.cc b/chrome/browser/chromeos/mobile_config.cc
index 7990e5c772102fff87b75611e502d29f6644d2fe..f523ad49fa79dece1f2785d1e1eab16fe52c39b4 100644
--- a/chrome/browser/chromeos/mobile_config.cc
+++ b/chrome/browser/chromeos/mobile_config.cc
@@ -6,7 +6,6 @@
#include <stddef.h>
-#include <algorithm>
#include <utility>
#include "base/bind.h"
@@ -15,6 +14,7 @@
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
+#include "base/stl_util.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
@@ -181,9 +181,7 @@ void MobileConfig::Carrier::InitFromDictionary(
if (deals_list->GetDictionary(i, &deal_dict)) {
std::unique_ptr<CarrierDeal> deal(new CarrierDeal(deal_dict));
// Filter out deals by initial_locale right away.
- auto iter = std::find(deal->locales().begin(), deal->locales().end(),
- initial_locale);
- if (iter != deal->locales().end()) {
+ if (base::ContainsValue(deal->locales(), initial_locale)) {
const std::string& deal_id = deal->deal_id();
deals_[deal_id] = std::move(deal);
}

Powered by Google App Engine
This is Rietveld 408576698