summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/base/bzip2_filter_unittest.cc2
-rw-r--r--net/base/file_stream_posix.cc7
-rw-r--r--net/base/file_stream_unittest.cc2
-rw-r--r--net/base/file_stream_win.cc7
-rw-r--r--net/base/gzip_filter_unittest.cc2
-rw-r--r--net/disk_cache/block_files_unittest.cc2
-rw-r--r--net/url_request/url_request_view_cache_job.cc3
7 files changed, 9 insertions, 16 deletions
diff --git a/net/base/bzip2_filter_unittest.cc b/net/base/bzip2_filter_unittest.cc
index 3dd5e14..9b1eab5 100644
--- a/net/base/bzip2_filter_unittest.cc
+++ b/net/base/bzip2_filter_unittest.cc
@@ -43,7 +43,7 @@ class BZip2FilterUnitTest : public PlatformTest {
file_path = file_path.AppendASCII("google.txt");
// Read data from the file into buffer.
- ASSERT_TRUE(file_util::ReadFileToString(file_path, &source_buffer_));
+ file_util::ReadFileToString(file_path, &source_buffer_);
// Append the extra data to end of source
source_buffer_.append(kExtraData, kExtraDataBufferSize);
diff --git a/net/base/file_stream_posix.cc b/net/base/file_stream_posix.cc
index aac0be2..5c55781 100644
--- a/net/base/file_stream_posix.cc
+++ b/net/base/file_stream_posix.cc
@@ -290,15 +290,12 @@ void FileStream::AsyncContext::RunAsynchronousCallback() {
// FileStream ------------------------------------------------------------
-FileStream::FileStream()
- : file_(base::kInvalidPlatformFileValue),
- open_flags_(0) {
+FileStream::FileStream() : file_(base::kInvalidPlatformFileValue) {
DCHECK(!IsOpen());
}
FileStream::FileStream(base::PlatformFile file, int flags)
- : file_(file),
- open_flags_(flags) {
+ : file_(file), open_flags_(flags) {
// If the file handle is opened with base::PLATFORM_FILE_ASYNC, we need to
// make sure we will perform asynchronous File IO to it.
if (flags & base::PLATFORM_FILE_ASYNC) {
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc
index f430d8e..4b8b12b 100644
--- a/net/base/file_stream_unittest.cc
+++ b/net/base/file_stream_unittest.cc
@@ -885,7 +885,7 @@ TEST_F(FileStreamTest, Truncate) {
// Read in the contents and make sure we get back what we expected.
std::string read_contents;
- EXPECT_TRUE(file_util::ReadFileToString(temp_file_path(), &read_contents));
+ file_util::ReadFileToString(temp_file_path(), &read_contents);
EXPECT_EQ("01230123", read_contents);
}
diff --git a/net/base/file_stream_win.cc b/net/base/file_stream_win.cc
index cec6a9d..09ad88e 100644
--- a/net/base/file_stream_win.cc
+++ b/net/base/file_stream_win.cc
@@ -115,14 +115,11 @@ void FileStream::AsyncContext::OnIOCompleted(
// FileStream ------------------------------------------------------------
-FileStream::FileStream()
- : file_(INVALID_HANDLE_VALUE),
- open_flags_(0) {
+FileStream::FileStream() : file_(INVALID_HANDLE_VALUE) {
}
FileStream::FileStream(base::PlatformFile file, int flags)
- : file_(file),
- open_flags_(flags) {
+ : file_(file), open_flags_(flags) {
// If the file handle is opened with base::PLATFORM_FILE_ASYNC, we need to
// make sure we will perform asynchronous File IO to it.
if (flags & base::PLATFORM_FILE_ASYNC) {
diff --git a/net/base/gzip_filter_unittest.cc b/net/base/gzip_filter_unittest.cc
index 91409a9..c933014 100644
--- a/net/base/gzip_filter_unittest.cc
+++ b/net/base/gzip_filter_unittest.cc
@@ -66,7 +66,7 @@ class GZipUnitTest : public PlatformTest {
file_path = file_path.AppendASCII("google.txt");
// Read data from the file into buffer.
- ASSERT_TRUE(file_util::ReadFileToString(file_path, &source_buffer_));
+ file_util::ReadFileToString(file_path, &source_buffer_);
// Encode the data with deflate
deflate_encode_buffer_ = new char[kDefaultBufferSize];
diff --git a/net/disk_cache/block_files_unittest.cc b/net/disk_cache/block_files_unittest.cc
index b4ce107..ce76fd6 100644
--- a/net/disk_cache/block_files_unittest.cc
+++ b/net/disk_cache/block_files_unittest.cc
@@ -14,7 +14,7 @@ using base::Time;
namespace {
// Returns the number of files in this folder.
-int NumberOfFiles(const std::wstring& path) {
+int NumberOfFiles(const std::wstring path) {
file_util::FileEnumerator iter(FilePath::FromWStringHack(path), false,
file_util::FileEnumerator::FILES);
int count = 0;
diff --git a/net/url_request/url_request_view_cache_job.cc b/net/url_request/url_request_view_cache_job.cc
index 4217f4f..6fd4e23 100644
--- a/net/url_request/url_request_view_cache_job.cc
+++ b/net/url_request/url_request_view_cache_job.cc
@@ -66,8 +66,7 @@ static std::string FormatEntryDetails(disk_cache::Entry* entry) {
std::string result = EscapeForHTML(entry->GetKey());
net::HttpResponseInfo response;
- if (!net::HttpCache::ReadResponseInfo(entry, &response))
- return "error reading cache entry";
+ net::HttpCache::ReadResponseInfo(entry, &response);
if (response.headers) {
result.append("<hr><pre>");