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

Unified Diff: components/ntp_snippets/ntp_snippets_fetcher.cc

Issue 2083933004: Logging the NTP snippets request when verbose. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippets_fetcher.cc
diff --git a/components/ntp_snippets/ntp_snippets_fetcher.cc b/components/ntp_snippets/ntp_snippets_fetcher.cc
index b7786e57eb9d7932041cb72a9e6b14188e915729..95a2b637a7b314a276c7b82a703cc453adaa3afe 100644
--- a/components/ntp_snippets/ntp_snippets_fetcher.cc
+++ b/components/ntp_snippets/ntp_snippets_fetcher.cc
@@ -255,6 +255,10 @@ void NTPSnippetsFetcher::FetchSnippetsImpl(const GURL& url,
headers.SetHeader("Content-Type", "application/json; charset=UTF-8");
url_fetcher_->SetExtraRequestHeaders(headers.ToString());
url_fetcher_->SetUploadData("application/json", request);
+ // Log the request for debugging network issues.
+ VLOG(1) << "Sendind a ntp snippets request to " << url << ":";
Bernhard Bauer 2016/06/21 16:33:05 Nit: "Sending", "NTP".
jkrcal 2016/06/23 08:21:35 Done.
+ VLOG(1) << headers.ToString();
Bernhard Bauer 2016/06/21 16:33:05 You don't need a new VLOG() invocation; just keep
jkrcal 2016/06/23 08:21:35 Done (added some new lines, as well).
+ VLOG(1) << request;
// Fetchers are sometimes cancelled because a network change was detected.
url_fetcher_->SetAutomaticallyRetryOnNetworkChanges(3);
// Try to make fetching the files bit more robust even with poor connection.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698