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

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: Fixed Posix compile error. Created 9 years, 4 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') | net/base/file_stream.h » ('J')
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 7593df8c1c52ed488ab3b19576b6e258ead7a45a..72ad72692c6a7897301335336bfdda3d0bc15a3a 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -36,6 +36,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() {
@@ -203,6 +205,7 @@ bool BaseFile::Open() {
// Create a new file stream if it is not provided.
if (!file_stream_.get()) {
file_stream_.reset(new net::FileStream);
+ file_stream_->EnableErrorStatistics();
if (file_stream_->Open(full_path_,
base::PLATFORM_FILE_OPEN_ALWAYS |
base::PLATFORM_FILE_WRITE) != net::OK) {
« no previous file with comments | « no previous file | net/base/file_stream.h » ('j') | net/base/file_stream.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698