Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / net / base / file_stream_context.cc
index 3e2c2e5..8909b2c 100644 (file)
@@ -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_tracker.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 ScopedTracker below once crbug.com/423948 is fixed.
+  tracked_objects::ScopedTracker 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 ScopedTracker below once crbug.com/423948 is fixed.
+    tracked_objects::ScopedTracker tracking_profile(
+        FROM_HERE_WITH_EXPLICIT_FUNCTION(
+            "423948 FileStream::Context::OnOpenCompleted"));
+
     OnFileOpened();
+  }
 
   OnAsyncCompleted(IntToInt64(callback), open_result.error_code);
 }