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

Side by Side Diff: Source/core/xml/XMLHttpRequest.cpp

Issue 44453002: Remove HistogramSupport abstraction layer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/timing/PerformanceUserTiming.cpp ('k') | Source/modules/indexeddb/IDBDatabase.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 27 matching lines...) Expand all
38 #include "core/fetch/TextResourceDecoder.h" 38 #include "core/fetch/TextResourceDecoder.h"
39 #include "core/fileapi/Blob.h" 39 #include "core/fileapi/Blob.h"
40 #include "core/fileapi/File.h" 40 #include "core/fileapi/File.h"
41 #include "core/fileapi/Stream.h" 41 #include "core/fileapi/Stream.h"
42 #include "core/frame/ContentSecurityPolicy.h" 42 #include "core/frame/ContentSecurityPolicy.h"
43 #include "core/html/DOMFormData.h" 43 #include "core/html/DOMFormData.h"
44 #include "core/html/HTMLDocument.h" 44 #include "core/html/HTMLDocument.h"
45 #include "core/inspector/InspectorInstrumentation.h" 45 #include "core/inspector/InspectorInstrumentation.h"
46 #include "core/loader/ThreadableLoader.h" 46 #include "core/loader/ThreadableLoader.h"
47 #include "core/page/Settings.h" 47 #include "core/page/Settings.h"
48 #include "core/platform/HistogramSupport.h"
49 #include "core/xml/XMLHttpRequestProgressEvent.h" 48 #include "core/xml/XMLHttpRequestProgressEvent.h"
50 #include "core/xml/XMLHttpRequestUpload.h" 49 #include "core/xml/XMLHttpRequestUpload.h"
51 #include "platform/Logging.h" 50 #include "platform/Logging.h"
52 #include "platform/SharedBuffer.h" 51 #include "platform/SharedBuffer.h"
53 #include "platform/blob/BlobData.h" 52 #include "platform/blob/BlobData.h"
54 #include "platform/network/HTTPParsers.h" 53 #include "platform/network/HTTPParsers.h"
55 #include "platform/network/ParsedContentType.h" 54 #include "platform/network/ParsedContentType.h"
56 #include "platform/network/ResourceError.h" 55 #include "platform/network/ResourceError.h"
57 #include "platform/network/ResourceRequest.h" 56 #include "platform/network/ResourceRequest.h"
57 #include "public/platform/Platform.h"
58 #include "weborigin/SecurityOrigin.h" 58 #include "weborigin/SecurityOrigin.h"
59 #include "wtf/ArrayBuffer.h" 59 #include "wtf/ArrayBuffer.h"
60 #include "wtf/ArrayBufferView.h" 60 #include "wtf/ArrayBufferView.h"
61 #include "wtf/RefCountedLeakCounter.h" 61 #include "wtf/RefCountedLeakCounter.h"
62 #include "wtf/StdLibExtras.h" 62 #include "wtf/StdLibExtras.h"
63 #include "wtf/UnusedParam.h" 63 #include "wtf/UnusedParam.h"
64 #include "wtf/text/CString.h" 64 #include "wtf/text/CString.h"
65 65
66 namespace WebCore { 66 namespace WebCore {
67 67
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 createRequest(es); 713 createRequest(es);
714 } 714 }
715 715
716 void XMLHttpRequest::send(ArrayBuffer* body, ExceptionState& es) 716 void XMLHttpRequest::send(ArrayBuffer* body, ExceptionState& es)
717 { 717 {
718 LOG(Network, "XMLHttpRequest %p send() ArrayBuffer %p", this, body); 718 LOG(Network, "XMLHttpRequest %p send() ArrayBuffer %p", this, body);
719 719
720 String consoleMessage("ArrayBuffer is deprecated in XMLHttpRequest.send(). U se ArrayBufferView instead."); 720 String consoleMessage("ArrayBuffer is deprecated in XMLHttpRequest.send(). U se ArrayBufferView instead.");
721 executionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, consoleMessage); 721 executionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, consoleMessage);
722 722
723 HistogramSupport::histogramEnumeration("WebCore.XHR.send.ArrayBufferOrView", XMLHttpRequestSendArrayBuffer, XMLHttpRequestSendArrayBufferOrViewMax); 723 WebKit::Platform::current()->histogramEnumeration("WebCore.XHR.send.ArrayBuf ferOrView", XMLHttpRequestSendArrayBuffer, XMLHttpRequestSendArrayBufferOrViewMa x);
724 724
725 sendBytesData(body->data(), body->byteLength(), es); 725 sendBytesData(body->data(), body->byteLength(), es);
726 } 726 }
727 727
728 void XMLHttpRequest::send(ArrayBufferView* body, ExceptionState& es) 728 void XMLHttpRequest::send(ArrayBufferView* body, ExceptionState& es)
729 { 729 {
730 LOG(Network, "XMLHttpRequest %p send() ArrayBufferView %p", this, body); 730 LOG(Network, "XMLHttpRequest %p send() ArrayBufferView %p", this, body);
731 731
732 HistogramSupport::histogramEnumeration("WebCore.XHR.send.ArrayBufferOrView", XMLHttpRequestSendArrayBufferView, XMLHttpRequestSendArrayBufferOrViewMax); 732 WebKit::Platform::current()->histogramEnumeration("WebCore.XHR.send.ArrayBuf ferOrView", XMLHttpRequestSendArrayBufferView, XMLHttpRequestSendArrayBufferOrVi ewMax);
733 733
734 sendBytesData(body->baseAddress(), body->byteLength(), es); 734 sendBytesData(body->baseAddress(), body->byteLength(), es);
735 } 735 }
736 736
737 void XMLHttpRequest::sendBytesData(const void* data, size_t length, ExceptionSta te& es) 737 void XMLHttpRequest::sendBytesData(const void* data, size_t length, ExceptionSta te& es)
738 { 738 {
739 if (!initSend(es)) 739 if (!initSend(es))
740 return; 740 return;
741 741
742 if (areMethodAndURLValidForSend()) { 742 if (areMethodAndURLValidForSend()) {
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 { 1372 {
1373 return EventTargetNames::XMLHttpRequest; 1373 return EventTargetNames::XMLHttpRequest;
1374 } 1374 }
1375 1375
1376 ExecutionContext* XMLHttpRequest::executionContext() const 1376 ExecutionContext* XMLHttpRequest::executionContext() const
1377 { 1377 {
1378 return ActiveDOMObject::executionContext(); 1378 return ActiveDOMObject::executionContext();
1379 } 1379 }
1380 1380
1381 } // namespace WebCore 1381 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/timing/PerformanceUserTiming.cpp ('k') | Source/modules/indexeddb/IDBDatabase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698