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

Unified Diff: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.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
« no previous file with comments | « no previous file | chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
index 1e7a586a5b1af48cf27d40074cbdd45e612cbd66..8ac0a002e597e919a0573a09ce43cfeb2cc7d92c 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h"
-#include <algorithm>
#include <utility>
#include "base/bind.h"
@@ -12,6 +11,7 @@
#include "base/files/file.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
+#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/time/time.h"
@@ -54,8 +54,7 @@ base::FilePath::StringType GetFileNameForDocument(
std::vector<base::FilePath::StringType> possible_extensions =
GetExtensionsForArcMimeType(document->mime_type);
if (!possible_extensions.empty() &&
- std::find(possible_extensions.begin(), possible_extensions.end(),
- extension) == possible_extensions.end()) {
+ !base::ContainsValue(possible_extensions, extension)) {
filename =
base::FilePath(filename).AddExtension(possible_extensions[0]).value();
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698