Commit 64e6b930 authored by Takeshi Yoshino's avatar Takeshi Yoshino Committed by Commit Bot

Remove a UMA item WebCore.WebSocket.BinaryTypeChangesAfterOpen

We've collected enough data to make the decision. Remove it to save
binary size.

Bug: 584616
Change-Id: I8edda0afdde749a56f6b47fd377ab37dda420afb
Reviewed-on: https://chromium-review.googlesource.com/530867Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Reviewed-by: default avatarAdam Rice <ricea@chromium.org>
Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478828}
parent c7a69f40
......@@ -227,7 +227,6 @@ DOMWebSocket::DOMWebSocket(ExecutionContext* context)
consumed_buffered_amount_(0),
buffered_amount_after_close_(0),
binary_type_(kBinaryTypeBlob),
binary_type_changes_after_open_(0),
subprotocol_(""),
extensions_(""),
event_queue_(EventQueue::Create(this)),
......@@ -420,16 +419,6 @@ void DOMWebSocket::ReleaseChannel() {
channel_ = nullptr;
}
void DOMWebSocket::LogBinaryTypeChangesAfterOpen() {
DEFINE_THREAD_SAFE_STATIC_LOCAL(
CustomCountHistogram, binary_type_changes_histogram,
("WebCore.WebSocket.BinaryTypeChangesAfterOpen", 1, 1024, 10));
DVLOG(3) << "WebSocket " << static_cast<void*>(this)
<< " logBinaryTypeChangesAfterOpen() logging "
<< binary_type_changes_after_open_;
binary_type_changes_histogram.Count(binary_type_changes_after_open_);
}
void DOMWebSocket::send(const String& message,
ExceptionState& exception_state) {
CString encoded_message = message.Utf8();
......@@ -631,24 +620,16 @@ String DOMWebSocket::binaryType() const {
void DOMWebSocket::setBinaryType(const String& binary_type) {
if (binary_type == "blob") {
SetBinaryTypeInternal(kBinaryTypeBlob);
binary_type_ = kBinaryTypeBlob;
return;
}
if (binary_type == "arraybuffer") {
SetBinaryTypeInternal(kBinaryTypeArrayBuffer);
binary_type_ = kBinaryTypeArrayBuffer;
return;
}
NOTREACHED();
}
void DOMWebSocket::SetBinaryTypeInternal(BinaryType binary_type) {
if (binary_type_ == binary_type)
return;
binary_type_ = binary_type;
if (state_ == kOpen || state_ == kClosing)
++binary_type_changes_after_open_;
}
const AtomicString& DOMWebSocket::InterfaceName() const {
return EventTargetNames::DOMWebSocket;
}
......@@ -664,10 +645,8 @@ void DOMWebSocket::ContextDestroyed(ExecutionContext*) {
channel_->Close(WebSocketChannel::kCloseEventCodeGoingAway, String());
ReleaseChannel();
}
if (state_ != kClosed) {
if (state_ != kClosed)
state_ = kClosed;
LogBinaryTypeChangesAfterOpen();
}
}
bool DOMWebSocket::HasPendingActivity() const {
......@@ -739,7 +718,6 @@ void DOMWebSocket::DidReceiveBinaryMessage(
void DOMWebSocket::DidError() {
NETWORK_DVLOG(1) << "WebSocket " << this << " didError()";
state_ = kClosed;
LogBinaryTypeChangesAfterOpen();
event_queue_->Dispatch(Event::Create(EventTypeNames::error));
}
......
......@@ -235,9 +235,6 @@ class MODULES_EXPORT DOMWebSocket : public EventTargetWithInlineData,
void RecordReceiveTypeHistogram(WebSocketReceiveType);
void RecordReceiveMessageSizeHistogram(WebSocketReceiveType, size_t);
void SetBinaryTypeInternal(BinaryType);
void LogBinaryTypeChangesAfterOpen();
Member<WebSocketChannel> channel_;
State state_;
......@@ -248,7 +245,6 @@ class MODULES_EXPORT DOMWebSocket : public EventTargetWithInlineData,
uint64_t consumed_buffered_amount_;
uint64_t buffered_amount_after_close_;
BinaryType binary_type_;
int binary_type_changes_after_open_;
// The subprotocol the server selected.
String subprotocol_;
String extensions_;
......
......@@ -82956,6 +82956,10 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram>
<histogram name="WebCore.WebSocket.BinaryTypeChangesAfterOpen">
<obsolete>
Deprecate 2017-06, as we've collected enough data to discuss. (see issue
584616).
</obsolete>
<owner>yhirano@chromium.org</owner>
<owner>ricea@chromium.org</owner>
<owner>tyoshino@chromium.org</owner>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment