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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm

Issue 2947593005: Use ContainsValue() instead of std::find() in chrome/browser/ui/ (Closed)
Patch Set: 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/ui/cocoa/extensions/browser_actions_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
index bdd5f0e36aa7565e4a6abee91dfac2966df272fb..2a09eb8c3806cd5807c63594e3958f72dea00a73 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
@@ -10,6 +10,7 @@
#include <utility>
#include "base/macros.h"
+#include "base/stl_util.h"
#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/extensions/extension_message_bubble_controller.h"
#include "chrome/browser/ui/browser.h"
@@ -460,8 +461,7 @@ void ToolbarActionsBarBridge::ShowToolbarActionBubble(
// Tracking down crbug.com/653100.
// TODO(devlin): Remove or relax this one the bug is fixed?
for (BrowserActionButton* button in buttons_.get()) {
- CHECK(std::find(toolbarActions.begin(), toolbarActions.end(),
- [button viewController]) != toolbarActions.end());
+ CHECK(base::ContainsValue(toolbarActions, [button viewController]));
}
// Reorder |buttons_| to reflect |toolbarActions|. (Ugly n^2 sort, but the
// data set should be tiny.)

Powered by Google App Engine
This is Rietveld 408576698