| Index: content/browser/renderer_host/resource_dispatcher_host.cc
|
| diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
|
| index 8aade02e3ca6be9636a49c416181a5b12dec891b..ebca54cd7d262454f2c47b689f264bd28e90f4aa 100644
|
| --- a/content/browser/renderer_host/resource_dispatcher_host.cc
|
| +++ b/content/browser/renderer_host/resource_dispatcher_host.cc
|
| @@ -121,6 +121,14 @@ const int kMaxPendingDataMessages = 20;
|
| // This bound is 25MB, which allows for around 6000 outstanding requests.
|
| const int kMaxOutstandingRequestsCostPerProcess = 26214400;
|
|
|
| +// All possible error codes from the network module. Note that the error codes
|
| +// are all positive (since histograms expect positive sample values).
|
| +const int kAllNetErrorCodes[] = {
|
| +#define NET_ERROR(label, value) -(value),
|
| +#include "net/base/net_error_list.h"
|
| +#undef NET_ERROR
|
| +};
|
| +
|
| // Aborts a request before an URLRequest has actually been created.
|
| void AbortRequestBeforeItStarts(ResourceMessageFilter* filter,
|
| IPC::Message* sync_result,
|
| @@ -209,17 +217,6 @@ void PopulateResourceResponse(net::URLRequest* request,
|
| &response->response_head.appcache_manifest_url);
|
| }
|
|
|
| -// Returns a list of all the possible error codes from the network module.
|
| -// Note that the error codes are all positive (since histograms expect positive
|
| -// sample values).
|
| -std::vector<int> GetAllNetErrorCodes() {
|
| - std::vector<int> all_error_codes;
|
| -#define NET_ERROR(label, value) all_error_codes.push_back(-(value));
|
| -#include "net/base/net_error_list.h"
|
| -#undef NET_ERROR
|
| - return all_error_codes;
|
| -}
|
| -
|
| void RemoveDownloadFileFromChildSecurityPolicy(int child_id,
|
| const FilePath& path) {
|
| ChildProcessSecurityPolicy::GetInstance()->RevokeAllPermissionsForFile(
|
| @@ -1582,9 +1579,14 @@ void ResourceDispatcherHost::OnResponseCompleted(net::URLRequest* request) {
|
| if (!request->status().is_success() &&
|
| info->resource_type() == ResourceType::MAIN_FRAME &&
|
| request->status().os_error() != net::ERR_ABORTED) {
|
| - UMA_HISTOGRAM_CUSTOM_ENUMERATION("Net.ErrorCodesForMainFrame",
|
| - -request->status().os_error(),
|
| - GetAllNetErrorCodes());
|
| + // This enumeration has "2" appended to its name to distinguish it from
|
| + // its original version. We changed the buckets at one point (added
|
| + // guard buckets by using CustomHistogram::ArrayToCustomRanges).
|
| + UMA_HISTOGRAM_CUSTOM_ENUMERATION(
|
| + "Net.ErrorCodesForMainFrame2",
|
| + -request->status().os_error(),
|
| + base::CustomHistogram::ArrayToCustomRanges(
|
| + kAllNetErrorCodes, arraysize(kAllNetErrorCodes)));
|
| }
|
|
|
| std::string security_info;
|
|
|