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

Side by Side Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 1652983005: Remove Enumeration Histograms from the Blink Platform API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_blink_histograms_5a
Patch Set: Rebase two new histograms were added today Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org>
4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org>
5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved.
6 * Copyright (C) 2012 Intel Corporation 6 * Copyright (C) 2012 Intel Corporation
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "core/inspector/InspectorInstrumentation.h" 56 #include "core/inspector/InspectorInstrumentation.h"
57 #include "core/inspector/InspectorTraceEvents.h" 57 #include "core/inspector/InspectorTraceEvents.h"
58 #include "core/loader/ThreadableLoader.h" 58 #include "core/loader/ThreadableLoader.h"
59 #include "core/page/ChromeClient.h" 59 #include "core/page/ChromeClient.h"
60 #include "core/page/Page.h" 60 #include "core/page/Page.h"
61 #include "core/streams/Stream.h" 61 #include "core/streams/Stream.h"
62 #include "core/xmlhttprequest/XMLHttpRequestProgressEvent.h" 62 #include "core/xmlhttprequest/XMLHttpRequestProgressEvent.h"
63 #include "core/xmlhttprequest/XMLHttpRequestUpload.h" 63 #include "core/xmlhttprequest/XMLHttpRequestUpload.h"
64 #include "platform/FileMetadata.h" 64 #include "platform/FileMetadata.h"
65 #include "platform/HTTPNames.h" 65 #include "platform/HTTPNames.h"
66 #include "platform/Histogram.h"
66 #include "platform/Logging.h" 67 #include "platform/Logging.h"
67 #include "platform/RuntimeEnabledFeatures.h" 68 #include "platform/RuntimeEnabledFeatures.h"
68 #include "platform/SharedBuffer.h" 69 #include "platform/SharedBuffer.h"
69 #include "platform/blob/BlobData.h" 70 #include "platform/blob/BlobData.h"
70 #include "platform/network/HTTPParsers.h" 71 #include "platform/network/HTTPParsers.h"
71 #include "platform/network/ParsedContentType.h" 72 #include "platform/network/ParsedContentType.h"
72 #include "platform/network/ResourceError.h" 73 #include "platform/network/ResourceError.h"
73 #include "platform/network/ResourceRequest.h" 74 #include "platform/network/ResourceRequest.h"
74 #include "public/platform/Platform.h"
75 #include "public/platform/WebURLRequest.h" 75 #include "public/platform/WebURLRequest.h"
76 #include "wtf/Assertions.h" 76 #include "wtf/Assertions.h"
77 #include "wtf/StdLibExtras.h" 77 #include "wtf/StdLibExtras.h"
78 #include "wtf/text/CString.h" 78 #include "wtf/text/CString.h"
79 79
80 namespace blink { 80 namespace blink {
81 81
82 namespace { 82 namespace {
83 83
84 // This class protects the wrapper of the associated XMLHttpRequest object 84 // This class protects the wrapper of the associated XMLHttpRequest object
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 if (FetchUtils::normalizeHeaderValue(newValue) != normalizedNewValue) 1199 if (FetchUtils::normalizeHeaderValue(newValue) != normalizedNewValue)
1200 headerValueCategory = HeaderValueAffectedByNormalization; 1200 headerValueCategory = HeaderValueAffectedByNormalization;
1201 1201
1202 result.storedValue->value = newValue; 1202 result.storedValue->value = newValue;
1203 } 1203 }
1204 1204
1205 String normalizedValue = FetchUtils::normalizeHeaderValue(value); 1205 String normalizedValue = FetchUtils::normalizeHeaderValue(value);
1206 if (!normalizedValue.isEmpty() && !isValidHTTPFieldContentRFC7230(normalized Value)) 1206 if (!normalizedValue.isEmpty() && !isValidHTTPFieldContentRFC7230(normalized Value))
1207 headerValueCategory = HeaderValueInvalid; 1207 headerValueCategory = HeaderValueInvalid;
1208 1208
1209 Platform::current()->histogramEnumeration("Blink.XHR.setRequestHeader.Header ValueCategoryInRFC7230", headerValueCategory, HeaderValueCategoryByRFC7230End); 1209 DEFINE_STATIC_LOCAL(EnumerationHistogram, headerValueCategoryHistogram, ("Bl ink.XHR.setRequestHeader.HeaderValueCategoryInRFC7230", HeaderValueCategoryByRFC 7230End));
sof 2016/02/07 20:14:19 XHR can be used by the main thread and workers, so
tyoshino (SeeGerritForStatus) 2016/02/08 08:38:21 Just received a bug report: https://code.google.co
1210 headerValueCategoryHistogram.count(headerValueCategory);
1210 } 1211 }
1211 1212
1212 const AtomicString& XMLHttpRequest::getRequestHeader(const AtomicString& name) c onst 1213 const AtomicString& XMLHttpRequest::getRequestHeader(const AtomicString& name) c onst
1213 { 1214 {
1214 return m_requestHeaders.get(name); 1215 return m_requestHeaders.get(name);
1215 } 1216 }
1216 1217
1217 String XMLHttpRequest::getAllResponseHeaders() const 1218 String XMLHttpRequest::getAllResponseHeaders() const
1218 { 1219 {
1219 if (m_state < HEADERS_RECEIVED || m_error) 1220 if (m_state < HEADERS_RECEIVED || m_error)
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 visitor->trace(m_responseDocumentParser); 1704 visitor->trace(m_responseDocumentParser);
1704 visitor->trace(m_progressEventThrottle); 1705 visitor->trace(m_progressEventThrottle);
1705 visitor->trace(m_upload); 1706 visitor->trace(m_upload);
1706 visitor->trace(m_blobLoader); 1707 visitor->trace(m_blobLoader);
1707 XMLHttpRequestEventTarget::trace(visitor); 1708 XMLHttpRequestEventTarget::trace(visitor);
1708 DocumentParserClient::trace(visitor); 1709 DocumentParserClient::trace(visitor);
1709 ActiveDOMObject::trace(visitor); 1710 ActiveDOMObject::trace(visitor);
1710 } 1711 }
1711 1712
1712 } // namespace blink 1713 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698