Commit e835a08f authored by Bailey Berro's avatar Bailey Berro Committed by Commit Bot

Pass a size_t to PpdLineReader

Change-Id: I05015028fd7ecf82188aad9dff8f31d2b1ed4579
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874812Reviewed-by: default avatarSean Kau <skau@chromium.org>
Commit-Queue: Bailey Berro <baileyberro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709251}
parent 3229bc0e
......@@ -180,13 +180,13 @@ constexpr int PpdLineReaderImpl::kReadBufCapacity;
// static
std::unique_ptr<PpdLineReader> PpdLineReader::Create(
const std::string& contents,
int max_line_length) {
size_t max_line_length) {
return std::make_unique<PpdLineReaderImpl>(contents, max_line_length);
}
// static
bool PpdLineReader::ContainsMagicNumber(const std::string& contents,
int max_line_length) {
size_t max_line_length) {
auto line_reader = PpdLineReader::Create(contents, max_line_length);
std::string line;
return line_reader->NextLine(&line) &&
......
......@@ -23,14 +23,14 @@ class CHROMEOS_EXPORT PpdLineReader {
// |contents| may or may not be gzip-compressed, and must remain valid and
// unchanged while the Created PpdReader exists.
static std::unique_ptr<PpdLineReader> Create(const std::string& contents,
int max_line_length);
size_t max_line_length);
// Checks to see whether the file contents in |contents| contains the magic
// number which is found at the beginning of every PPD file. To verify this,
// a line reader is created which simply attempts to read the first line and
// checks whether it contains the magic number.
static bool ContainsMagicNumber(const std::string& contents,
int max_line_length);
size_t max_line_length);
virtual ~PpdLineReader() = default;
......
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