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

Unified Diff: shell/application_manager/network_fetcher.cc

Issue 1024723002: Add some trace points to mojo_shell for app lifetime (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
Index: shell/application_manager/network_fetcher.cc
diff --git a/shell/application_manager/network_fetcher.cc b/shell/application_manager/network_fetcher.cc
index 05aba7ab3605b5837b5acdb53e789b03f50c0246..470d2a374925c451b0887d6dbe302a86fb0198b4 100644
--- a/shell/application_manager/network_fetcher.cc
+++ b/shell/application_manager/network_fetcher.cc
@@ -14,6 +14,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "base/trace_event/trace_event.h"
#include "crypto/secure_hash.h"
#include "crypto/sha2.h"
#include "mojo/common/common_type_converters.h"
@@ -182,6 +183,8 @@ bool NetworkFetcher::PeekFirstLine(std::string* line) {
void NetworkFetcher::StartNetworkRequest(const GURL& url,
NetworkService* network_service) {
+ TRACE_EVENT_ASYNC_BEGIN0("mojo_shell", "NetworkFetcher::NetworkRequest",
viettrungluu 2015/03/24 20:04:34 Maybe also record the url here?
jamesr 2015/03/27 20:42:21 Done.
+ this);
URLRequestPtr request(URLRequest::New());
request->url = String::From(url);
request->auto_follow_redirects = false;
@@ -194,6 +197,7 @@ void NetworkFetcher::StartNetworkRequest(const GURL& url,
}
void NetworkFetcher::OnLoadComplete(URLResponsePtr response) {
+ TRACE_EVENT_ASYNC_END0("mojo_shell", "NetworkFetcher::NetworkRequest", this);
if (response->error) {
LOG(ERROR) << "Error (" << response->error->code << ": "
<< response->error->description << ") while fetching "

Powered by Google App Engine
This is Rietveld 408576698