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

Unified Diff: content/browser/download/base_file.cc

Issue 7583049: Record UMA statistics for file_stream operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed extra logging. Created 9 years, 3 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 | « no previous file | net/base/file_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/base_file.cc
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index 7e5976a95aa1c6dc5bfa84c22d9bc5e0014a3772..c6ae0eeaa3b24957cc77fbdcc90d41967e2ae954 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -198,6 +198,8 @@ BaseFile::BaseFile(const FilePath& full_path,
detached_(false) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
memset(sha256_hash_, 0, sizeof(sha256_hash_));
+ if (file_stream_.get())
+ file_stream_->EnableErrorStatistics();
}
BaseFile::~BaseFile() {
@@ -388,6 +390,7 @@ net::Error BaseFile::Open() {
// Create a new file stream if it is not provided.
if (!file_stream_.get()) {
CreateFileStream();
+ file_stream_->EnableErrorStatistics();
int open_result = file_stream_->Open(
full_path_,
base::PLATFORM_FILE_OPEN_ALWAYS | base::PLATFORM_FILE_WRITE);
« no previous file with comments | « no previous file | net/base/file_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698