 Chromium Code Reviews
 Chromium Code Reviews Issue 7583049:
  Record UMA statistics for file_stream operations.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 7583049:
  Record UMA statistics for file_stream operations.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| 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..48e010e91403a10b98500c53f52202998c477efb 100644 | 
| --- a/content/browser/download/base_file.cc | 
| +++ b/content/browser/download/base_file.cc | 
| @@ -36,6 +36,9 @@ BaseFile::BaseFile(const FilePath& full_path, | 
| detached_(false) { | 
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 
| memset(sha256_hash_, 0, sizeof(sha256_hash_)); | 
| + if (file_stream_.get()) | 
| 
cbentzel
2011/08/15 19:49:11
When will you not have a file_stream? It's fine to
 
ahendrickson
2011/08/15 23:42:26
This is the typical case for downloads, as the fil
 | 
| + file_stream_->EnableRecording(true, net::RECORDING_CLASS_DOWNLOADS); | 
| + net::EnableRecordingForClass(net::RECORDING_CLASS_DOWNLOADS); | 
| } | 
| BaseFile::~BaseFile() { | 
| @@ -202,7 +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_.reset(new net::FileStream(net::RECORDING_CLASS_DOWNLOADS)); | 
| if (file_stream_->Open(full_path_, | 
| base::PLATFORM_FILE_OPEN_ALWAYS | | 
| base::PLATFORM_FILE_WRITE) != net::OK) { |