| 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 7fe3d94b0e54b22c86e052357ff1bf1e2a1f0f48..3dd50354dd411f89befa333246e436ff2a8b0f39 100644
|
| --- a/components/ntp_snippets/ntp_snippets_fetcher.cc
|
| +++ b/components/ntp_snippets/ntp_snippets_fetcher.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/files/file_path.h"
|
| #include "base/files/file_util.h"
|
| +#include "base/metrics/sparse_histogram.h"
|
| #include "base/path_service.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/string_util.h"
|
| @@ -120,6 +121,11 @@ void NTPSnippetsFetcher::OnURLFetchComplete(const URLFetcher* source) {
|
|
|
| std::string message;
|
| const URLRequestStatus& status = source->GetStatus();
|
| +
|
| + UMA_HISTOGRAM_SPARSE_SLOWLY(
|
| + "NewTabPage.Snippets.FetchHttpResponseOrErrorCode",
|
| + status.is_success() ? source->GetResponseCode() : status.error());
|
| +
|
| if (!status.is_success()) {
|
| message = base::StringPrintf(kStatusMessageURLRequestErrorFormat,
|
| status.error());
|
|
|