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

Unified Diff: chrome/browser/extensions/api/gcm/gcm_apitest.cc

Issue 2961033002: Use ContainsValue() instead of std::find() in chrome/browser/extensions (Closed)
Patch Set: Reverted code changes in language_settings_private_api.cc:307 Created 3 years, 5 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/extensions/api/gcm/gcm_apitest.cc
diff --git a/chrome/browser/extensions/api/gcm/gcm_apitest.cc b/chrome/browser/extensions/api/gcm/gcm_apitest.cc
index c3951ad0b46dfa3e7b738d3536ea96245d86850f..6f2e39f089c787dd1035d2fd022f200743597047 100644
--- a/chrome/browser/extensions/api/gcm/gcm_apitest.cc
+++ b/chrome/browser/extensions/api/gcm/gcm_apitest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/run_loop.h"
+#include "base/stl_util.h"
#include "chrome/browser/extensions/api/gcm/gcm_api.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_gcm_app_handler.h"
@@ -123,10 +124,8 @@ IN_PROC_BROWSER_TEST_F(GcmApiTest, Register) {
const std::vector<std::string>& sender_ids =
service()->last_registered_sender_ids();
- EXPECT_TRUE(std::find(sender_ids.begin(), sender_ids.end(), "Sender1") !=
- sender_ids.end());
- EXPECT_TRUE(std::find(sender_ids.begin(), sender_ids.end(), "Sender2") !=
- sender_ids.end());
+ EXPECT_TRUE(base::ContainsValue(sender_ids, "Sender1"));
+ EXPECT_TRUE(base::ContainsValue(sender_ids, "Sender2"));
}
IN_PROC_BROWSER_TEST_F(GcmApiTest, Unregister) {

Powered by Google App Engine
This is Rietveld 408576698