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

Unified Diff: chrome/browser/ui/android/website_settings_popup_android.cc

Issue 1715683002: chrome: Use base's ContainsValue helper function instead of std::find (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated as per latest code Created 4 years, 8 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/android/website_settings_popup_android.cc
diff --git a/chrome/browser/ui/android/website_settings_popup_android.cc b/chrome/browser/ui/android/website_settings_popup_android.cc
index 6d10afd81a447269c1353bae6a6bc5961b1ab86a..1e24271f6c68f537b6d7a5a64b9c0a4334be04f6 100644
--- a/chrome/browser/ui/android/website_settings_popup_android.cc
+++ b/chrome/browser/ui/android/website_settings_popup_android.cc
@@ -7,6 +7,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_array.h"
#include "base/android/jni_string.h"
+#include "base/stl_util.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ssl/chrome_security_state_model_client.h"
@@ -112,9 +113,7 @@ void WebsiteSettingsPopupAndroid::SetPermissionInfo(
user_specified_settings_to_display;
for (const auto& permission : permission_info_list) {
- if (std::find(permissions_to_display.begin(),
- permissions_to_display.end(),
- permission.type) != permissions_to_display.end() &&
+ if (ContainsValue(permissions_to_display, permission.type) &&
permission.setting != CONTENT_SETTING_DEFAULT) {
user_specified_settings_to_display[permission.type] = permission.setting;
}
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698