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

Side by Side Diff: third_party/WebKit/Source/modules/websockets/InspectorWebSocketEvents.cpp

Issue 1979953002: Remove OwnPtr::release() calls in modules/ (part 3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "modules/websockets/InspectorWebSocketEvents.h" 5 #include "modules/websockets/InspectorWebSocketEvents.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "platform/weborigin/KURL.h" 8 #include "platform/weborigin/KURL.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 PassOwnPtr<TracedValue> InspectorWebSocketCreateEvent::data(Document* document, unsigned long identifier, const KURL& url, const String& protocol) 12 PassOwnPtr<TracedValue> InspectorWebSocketCreateEvent::data(Document* document, unsigned long identifier, const KURL& url, const String& protocol)
13 { 13 {
14 OwnPtr<TracedValue> value = TracedValue::create(); 14 OwnPtr<TracedValue> value = TracedValue::create();
15 value->setInteger("identifier", identifier); 15 value->setInteger("identifier", identifier);
16 value->setString("url", url.getString()); 16 value->setString("url", url.getString());
17 value->setString("frame", toHexString(document->frame())); 17 value->setString("frame", toHexString(document->frame()));
18 if (!protocol.isNull()) 18 if (!protocol.isNull())
19 value->setString("webSocketProtocol", protocol); 19 value->setString("webSocketProtocol", protocol);
20 setCallStack(value.get()); 20 setCallStack(value.get());
21 return value.release(); 21 return value;
22 } 22 }
23 23
24 PassOwnPtr<TracedValue> InspectorWebSocketEvent::data(Document* document, unsign ed long identifier) 24 PassOwnPtr<TracedValue> InspectorWebSocketEvent::data(Document* document, unsign ed long identifier)
25 { 25 {
26 OwnPtr<TracedValue> value = TracedValue::create(); 26 OwnPtr<TracedValue> value = TracedValue::create();
27 value->setInteger("identifier", identifier); 27 value->setInteger("identifier", identifier);
28 value->setString("frame", toHexString(document->frame())); 28 value->setString("frame", toHexString(document->frame()));
29 setCallStack(value.get()); 29 setCallStack(value.get());
30 return value.release(); 30 return value;
31 } 31 }
32 32
33 } // namespace blink 33 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698