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

Unified Diff: net/tools/dump_cache/cache_dumper.cc

Issue 2253001: Revert 48186, 48196, 48198 (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 7 months 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
« no previous file with comments | « net/socket/tcp_client_socket_win.cc ('k') | net/tools/dump_cache/upgrade.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/dump_cache/cache_dumper.cc
diff --git a/net/tools/dump_cache/cache_dumper.cc b/net/tools/dump_cache/cache_dumper.cc
index a2e071a3ad13b19c7ac60732ed9d0841faaec27c..20ba6b544bb8eb23ac4daa5bf265f427585ee560 100644
--- a/net/tools/dump_cache/cache_dumper.cc
+++ b/net/tools/dump_cache/cache_dumper.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -89,10 +89,6 @@ bool DiskDumper::CreateEntry(const std::string& key,
#ifdef WIN32_LARGE_FILENAME_SUPPORT
entry_ = CreateFileW(file.c_str(), GENERIC_WRITE|GENERIC_READ, 0, 0,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
- if (entry_ == INVALID_HANDLE_VALUE) {
- wprintf(L"CreateFileW (%s) failed: %d\n", file.c_str(), GetLastError());
- return false;
- }
return entry_ != INVALID_HANDLE_VALUE;
#else
entry_ = file_util::OpenFile(entry_path_, "w+");
@@ -188,7 +184,7 @@ bool DiskDumper::WriteEntry(disk_cache::Entry* entry, int index, int offset,
#ifdef WIN32_LARGE_FILENAME_SUPPORT
DWORD bytes;
DWORD rv = WriteFile(entry_, data, len, &bytes, 0);
- return rv == TRUE && bytes == static_cast<DWORD>(len);
+ return rv == TRUE && bytes == len;
#else
int bytes = fwrite(data, 1, len, entry_);
return bytes == len;
« no previous file with comments | « net/socket/tcp_client_socket_win.cc ('k') | net/tools/dump_cache/upgrade.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698