diff options
-rw-r--r-- | chrome/common/child_thread.cc | 2 | ||||
-rw-r--r-- | chrome/common/child_thread.h | 2 | ||||
-rw-r--r-- | chrome/test/automation/automation_proxy_uitest.cc | 2 | ||||
-rw-r--r-- | net/base/bzip2_filter_unittest.cc | 2 | ||||
-rw-r--r-- | net/base/file_stream_posix.cc | 7 | ||||
-rw-r--r-- | net/base/file_stream_unittest.cc | 2 | ||||
-rw-r--r-- | net/base/file_stream_win.cc | 7 | ||||
-rw-r--r-- | net/base/gzip_filter_unittest.cc | 2 | ||||
-rw-r--r-- | net/disk_cache/block_files_unittest.cc | 2 | ||||
-rw-r--r-- | net/url_request/url_request_view_cache_job.cc | 4 |
10 files changed, 18 insertions, 14 deletions
diff --git a/chrome/common/child_thread.cc b/chrome/common/child_thread.cc index 9168570..8e9e90c 100644 --- a/chrome/common/child_thread.cc +++ b/chrome/common/child_thread.cc @@ -22,7 +22,7 @@ ChildThread::ChildThread() { Init(); } -ChildThread::ChildThread(const std::string channel_name) +ChildThread::ChildThread(const std::string& channel_name) : channel_name_(channel_name) { Init(); } diff --git a/chrome/common/child_thread.h b/chrome/common/child_thread.h index 91ea9b7..afcd803 100644 --- a/chrome/common/child_thread.h +++ b/chrome/common/child_thread.h @@ -20,7 +20,7 @@ class ChildThread : public IPC::Channel::Listener, // Creates the thread. ChildThread(); // Used for single-process mode. - ChildThread(const std::string channel_name); + ChildThread(const std::string& channel_name); virtual ~ChildThread(); // IPC::Message::Sender implementation: diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index 75395af..c67c1f7 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -829,7 +829,7 @@ TEST_F(ExternalTabTestType, IncognitoMode) { tab = NULL; CloseBrowserAndServer(); - value_result.empty(); + value_result.clear(); clear_profile_ = false; external_tab_container = NULL; tab_wnd = NULL; diff --git a/net/base/bzip2_filter_unittest.cc b/net/base/bzip2_filter_unittest.cc index 7705ebb..4e6ec54 100644 --- a/net/base/bzip2_filter_unittest.cc +++ b/net/base/bzip2_filter_unittest.cc @@ -48,7 +48,7 @@ class BZip2FilterUnitTest : public PlatformTest { file_path = file_path.AppendASCII("google.txt"); // Read data from the file into buffer. - file_util::ReadFileToString(file_path, &source_buffer_); + ASSERT_TRUE(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 5c55781..aac0be2 100644 --- a/net/base/file_stream_posix.cc +++ b/net/base/file_stream_posix.cc @@ -290,12 +290,15 @@ void FileStream::AsyncContext::RunAsynchronousCallback() { // FileStream ------------------------------------------------------------ -FileStream::FileStream() : file_(base::kInvalidPlatformFileValue) { +FileStream::FileStream() + : file_(base::kInvalidPlatformFileValue), + open_flags_(0) { 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 4b8b12b..f430d8e 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; - file_util::ReadFileToString(temp_file_path(), &read_contents); + EXPECT_TRUE(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 09ad88e..cec6a9d 100644 --- a/net/base/file_stream_win.cc +++ b/net/base/file_stream_win.cc @@ -115,11 +115,14 @@ void FileStream::AsyncContext::OnIOCompleted( // FileStream ------------------------------------------------------------ -FileStream::FileStream() : file_(INVALID_HANDLE_VALUE) { +FileStream::FileStream() + : file_(INVALID_HANDLE_VALUE), + open_flags_(0) { } 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 3b464ea..377b521 100644 --- a/net/base/gzip_filter_unittest.cc +++ b/net/base/gzip_filter_unittest.cc @@ -71,7 +71,7 @@ class GZipUnitTest : public PlatformTest { file_path = file_path.AppendASCII("google.txt"); // Read data from the file into buffer. - file_util::ReadFileToString(file_path, &source_buffer_); + ASSERT_TRUE(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 ce76fd6..b4ce107 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 6fd4e23..ca82680 100644 --- a/net/url_request/url_request_view_cache_job.cc +++ b/net/url_request/url_request_view_cache_job.cc @@ -66,9 +66,7 @@ static std::string FormatEntryDetails(disk_cache::Entry* entry) { std::string result = EscapeForHTML(entry->GetKey()); net::HttpResponseInfo response; - net::HttpCache::ReadResponseInfo(entry, &response); - - if (response.headers) { + if (net::HttpCache::ReadResponseInfo(entry, &response) && response.headers) { result.append("<hr><pre>"); result.append(EscapeForHTML(response.headers->GetStatusLine())); result.push_back('\n'); |