OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading |
6 | 6 |
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
749 | 749 |
750 if (loader->request()->url().SchemeIsSecure() && | 750 if (loader->request()->url().SchemeIsSecure() && |
751 loader->request()->url().host() == "www.google.com") { | 751 loader->request()->url().host() == "www.google.com") { |
752 UMA_HISTOGRAM_CUSTOM_ENUMERATION( | 752 UMA_HISTOGRAM_CUSTOM_ENUMERATION( |
753 "Net.ErrorCodesForHTTPSGoogleMainFrame2", | 753 "Net.ErrorCodesForHTTPSGoogleMainFrame2", |
754 -loader->request()->status().error(), | 754 -loader->request()->status().error(), |
755 base::CustomHistogram::ArrayToCustomRanges( | 755 base::CustomHistogram::ArrayToCustomRanges( |
756 kAllNetErrorCodes, arraysize(kAllNetErrorCodes))); | 756 kAllNetErrorCodes, arraysize(kAllNetErrorCodes))); |
757 } | 757 } |
758 } else { | 758 } else { |
759 if (info->GetResourceType() == ResourceType::IMAGE) { | |
760 UMA_HISTOGRAM_CUSTOM_ENUMERATION( | |
761 "Net.ErrorCodesForImages", | |
762 -loader->request()->status().error(), | |
763 base::CustomHistogram::ArrayToCustomRanges( | |
764 kAllNetErrorCodes, arraysize(kAllNetErrorCodes))); | |
Ilya Sherman
2013/04/26 23:59:10
Can you use a sparse histogram here? (The corresp
jar (doing other things)
2013/04/27 00:48:58
+1
On 2013/04/26 23:59:10, Ilya Sherman wrote:
James Simonsen
2013/04/27 00:57:07
If we're going to do that, we should update all of
jar (doing other things)
2013/04/27 01:00:53
SGTM
The list has gotten long (so memory utilizat
Stephen
2013/04/27 03:02:41
OK so IIUC the code here should be UMA_HISTOGRAM_S
Ilya Sherman
2013/04/27 23:06:23
Assuming that the expression "-loader->request()->
| |
765 } | |
759 // This enumeration has "2" appended to distinguish it from older versions. | 766 // This enumeration has "2" appended to distinguish it from older versions. |
760 UMA_HISTOGRAM_CUSTOM_ENUMERATION( | 767 UMA_HISTOGRAM_CUSTOM_ENUMERATION( |
761 "Net.ErrorCodesForSubresources2", | 768 "Net.ErrorCodesForSubresources2", |
762 -loader->request()->status().error(), | 769 -loader->request()->status().error(), |
763 base::CustomHistogram::ArrayToCustomRanges( | 770 base::CustomHistogram::ArrayToCustomRanges( |
764 kAllNetErrorCodes, arraysize(kAllNetErrorCodes))); | 771 kAllNetErrorCodes, arraysize(kAllNetErrorCodes))); |
765 } | 772 } |
766 | 773 |
767 // Destroy the ResourceLoader. | 774 // Destroy the ResourceLoader. |
768 RemovePendingRequest(info->GetChildID(), info->GetRequestID()); | 775 RemovePendingRequest(info->GetChildID(), info->GetRequestID()); |
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1791 DelegateMap::iterator it = delegate_map_.find(id); | 1798 DelegateMap::iterator it = delegate_map_.find(id); |
1792 DCHECK(it->second->HasObserver(delegate)); | 1799 DCHECK(it->second->HasObserver(delegate)); |
1793 it->second->RemoveObserver(delegate); | 1800 it->second->RemoveObserver(delegate); |
1794 if (it->second->size() == 0) { | 1801 if (it->second->size() == 0) { |
1795 delete it->second; | 1802 delete it->second; |
1796 delegate_map_.erase(it); | 1803 delegate_map_.erase(it); |
1797 } | 1804 } |
1798 } | 1805 } |
1799 | 1806 |
1800 } // namespace content | 1807 } // namespace content |
OLD | NEW |