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

Unified Diff: content/browser/fileapi/sandbox_database_test_helper.cc

Issue 1502503004: Remove kuint64max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint8
Patch Set: rebase Created 5 years 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: content/browser/fileapi/sandbox_database_test_helper.cc
diff --git a/content/browser/fileapi/sandbox_database_test_helper.cc b/content/browser/fileapi/sandbox_database_test_helper.cc
index bedc104d0b267b29ee9c23bfee83627c0fcd890a..45dbaff79c3e0c13dcf258967f811f3c2782a1b6 100644
--- a/content/browser/fileapi/sandbox_database_test_helper.cc
+++ b/content/browser/fileapi/sandbox_database_test_helper.cc
@@ -4,8 +4,11 @@
#include "content/browser/fileapi/sandbox_database_test_helper.h"
+#include <stdint.h>
+
#include <algorithm>
#include <functional>
+#include <limits>
#include <vector>
#include "base/files/file.h"
@@ -26,22 +29,23 @@ void CorruptDatabase(const base::FilePath& db_path,
base::FileEnumerator::DIRECTORIES | base::FileEnumerator::FILES);
base::FilePath file_path;
base::FilePath picked_file_path;
- uint64 picked_file_number = kuint64max;
+ uint64_t picked_file_number = std::numeric_limits<uint64_t>::max();
while (!(file_path = file_enum.Next()).empty()) {
- uint64 number = kuint64max;
+ uint64_t number = std::numeric_limits<uint64_t>::max();
leveldb::FileType file_type;
EXPECT_TRUE(leveldb::ParseFileName(FilePathToString(file_path.BaseName()),
&number, &file_type));
if (file_type == type &&
- (picked_file_number == kuint64max || picked_file_number < number)) {
+ (picked_file_number == std::numeric_limits<uint64_t>::max() ||
+ picked_file_number < number)) {
picked_file_path = file_path;
picked_file_number = number;
}
}
EXPECT_FALSE(picked_file_path.empty());
- EXPECT_NE(kuint64max, picked_file_number);
+ EXPECT_NE(std::numeric_limits<uint64_t>::max(), picked_file_number);
base::File file(picked_file_path,
base::File::FLAG_OPEN | base::File::FLAG_READ |
@@ -78,7 +82,7 @@ void DeleteDatabaseFile(const base::FilePath& db_path,
base::FileEnumerator::DIRECTORIES | base::FileEnumerator::FILES);
base::FilePath file_path;
while (!(file_path = file_enum.Next()).empty()) {
- uint64 number = kuint64max;
+ uint64_t number = std::numeric_limits<uint64_t>::max();
leveldb::FileType file_type;
EXPECT_TRUE(leveldb::ParseFileName(FilePathToString(file_path.BaseName()),
&number, &file_type));
« no previous file with comments | « components/storage_monitor/storage_monitor_linux.cc ('k') | content/browser/fileapi/upload_file_system_file_element_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698