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

Unified Diff: net/base/file_stream_context.cc

Issue 641223004: Adding instrumentation to locate the source of jankiness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « chrome/browser/chromeos/drive/local_file_reader.cc ('k') | net/base/upload_file_element_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « chrome/browser/chromeos/drive/local_file_reader.cc ('k') | net/base/upload_file_element_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698