Commit fcc7bd6d authored by Adrian Elder's avatar Adrian Elder Committed by Chromium LUCI CQ

logs: change max_read_size_ from int64_t to size_t

Doing this to match other sizes and lengths it is compared with.

Bug: 1150460
Change-Id: If20ecddb55527ca603a86dc9db2ba3a3a5f7ebcb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568375Reviewed-by: default avatarMiriam Zimmerman <mutexlox@chromium.org>
Commit-Queue: Adrian Elder <aelder@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832550}
parent 3b5e4840
...@@ -28,7 +28,7 @@ constexpr int kMaxNumAllowedLogRotationsDuringFileRead = 3; ...@@ -28,7 +28,7 @@ constexpr int kMaxNumAllowedLogRotationsDuringFileRead = 3;
// responsible for further bundling and truncating. // responsible for further bundling and truncating.
// * This cap is applied to the read buffer before dropping trailing incomplete // * This cap is applied to the read buffer before dropping trailing incomplete
// lines. // lines.
constexpr int64_t kMaxReadSize = 5 * 1024 * 1024; constexpr size_t kMaxReadSize = 5 * 1024 * 1024;
// A custom timestamp for when the current Chrome session started. Used during // A custom timestamp for when the current Chrome session started. Used during
// testing to override the actual time. // testing to override the actual time.
...@@ -117,7 +117,7 @@ void SingleLogFileLogSource::Fetch(SysLogsSourceCallback callback) { ...@@ -117,7 +117,7 @@ void SingleLogFileLogSource::Fetch(SysLogsSourceCallback callback) {
} }
void SingleLogFileLogSource::SetMaxReadSizeForTesting( void SingleLogFileLogSource::SetMaxReadSizeForTesting(
const int64_t max_read_size) { const size_t max_read_size) {
max_read_size_ = max_read_size; max_read_size_ = max_read_size;
} }
......
...@@ -59,7 +59,7 @@ class SingleLogFileLogSource : public SystemLogsSource { ...@@ -59,7 +59,7 @@ class SingleLogFileLogSource : public SystemLogsSource {
// system_logs::SystemLogsSource: // system_logs::SystemLogsSource:
void Fetch(SysLogsSourceCallback callback) override; void Fetch(SysLogsSourceCallback callback) override;
void SetMaxReadSizeForTesting(int64_t max_read_size); void SetMaxReadSizeForTesting(size_t max_read_size);
private: private:
friend class SingleLogFileLogSourceTest; friend class SingleLogFileLogSourceTest;
...@@ -104,7 +104,7 @@ class SingleLogFileLogSource : public SystemLogsSource { ...@@ -104,7 +104,7 @@ class SingleLogFileLogSource : public SystemLogsSource {
base::FilePath log_file_dir_path_; base::FilePath log_file_dir_path_;
// The maximum size of a read from |file_|. // The maximum size of a read from |file_|.
int64_t max_read_size_; size_t max_read_size_;
// Keeps track of how much data has been read or skipped from |file_|. // Keeps track of how much data has been read or skipped from |file_|.
size_t file_cursor_position_; size_t file_cursor_position_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment