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

Unified Diff: chrome/browser/internal_auth.cc

Issue 2958223002: Use ContainsValue() instead of std::find() in chrome/browser and chrome/common (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: chrome/browser/internal_auth.cc
diff --git a/chrome/browser/internal_auth.cc b/chrome/browser/internal_auth.cc
index 8165e6473bf28b61838ac2220f917c705de2d0ce..3a3894cf85233b3cdb40b9a7b76ec6303e663fd9 100644
--- a/chrome/browser/internal_auth.cc
+++ b/chrome/browser/internal_auth.cc
@@ -16,6 +16,7 @@
#include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/rand_util.h"
+#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
@@ -388,8 +389,7 @@ class InternalAuthGenerationService : public base::ThreadChecker {
int idx = static_cast<int>(used_ticks_.size()) -
static_cast<int>(current_tick - tick + 1);
if (idx < 0 || used_ticks_[idx] != tick) {
- DCHECK(used_ticks_.end() ==
- std::find(used_ticks_.begin(), used_ticks_.end(), tick));
+ DCHECK(!base::ContainsValue(used_ticks_, tick));
return tick;
}
}
« no previous file with comments | « chrome/browser/custom_handlers/protocol_handler_registry.cc ('k') | chrome/browser/lifetime/browser_close_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698