Index: net/base/file_stream_context.cc |
diff --git a/net/base/file_stream_context.cc b/net/base/file_stream_context.cc |
index 3e2c2e5fc2732d0279e0a1fb68be658b7df9d4af..b242ebafec9336eb53c2b2cb7805835410e5ac12 100644 |
--- a/net/base/file_stream_context.cc |
+++ b/net/base/file_stream_context.cc |
@@ -7,6 +7,7 @@ |
#include "base/files/file_path.h" |
#include "base/location.h" |
#include "base/message_loop/message_loop_proxy.h" |
+#include "base/profiler/scoped_profile.h" |
#include "base/task_runner.h" |
#include "base/task_runner_util.h" |
#include "base/threading/thread_restrictions.h" |
@@ -149,6 +150,11 @@ void FileStream::Context::Flush(const CompletionCallback& callback) { |
FileStream::Context::OpenResult FileStream::Context::OpenFileImpl( |
const base::FilePath& path, int open_flags) { |
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/423948 is fixed. |
+ tracked_objects::ScopedProfile tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "423948 FileStream::Context::OpenFileImpl")); |
+ |
#if defined(OS_POSIX) |
// Always use blocking IO. |
open_flags &= ~base::File::FLAG_ASYNC; |
@@ -195,8 +201,14 @@ FileStream::Context::IOResult FileStream::Context::FlushFileImpl() { |
void FileStream::Context::OnOpenCompleted(const CompletionCallback& callback, |
OpenResult open_result) { |
file_ = open_result.file.Pass(); |
- if (file_.IsValid() && !orphaned_) |
+ if (file_.IsValid() && !orphaned_) { |
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/423948 is fixed. |
+ tracked_objects::ScopedProfile tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "423948 FileStream::Context::OnOpenCompleted")); |
+ |
OnFileOpened(); |
+ } |
OnAsyncCompleted(IntToInt64(callback), open_result.error_code); |
} |