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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 #include <memory>
9 10
10 namespace blink { 11 namespace blink {
11 12
12 PassOwnPtr<TracedValue> InspectorWebSocketCreateEvent::data(Document* document, unsigned long identifier, const KURL& url, const String& protocol) 13 std::unique_ptr<TracedValue> InspectorWebSocketCreateEvent::data(Document* docum ent, unsigned long identifier, const KURL& url, const String& protocol)
13 { 14 {
14 OwnPtr<TracedValue> value = TracedValue::create(); 15 std::unique_ptr<TracedValue> value = TracedValue::create();
15 value->setInteger("identifier", identifier); 16 value->setInteger("identifier", identifier);
16 value->setString("url", url.getString()); 17 value->setString("url", url.getString());
17 value->setString("frame", toHexString(document->frame())); 18 value->setString("frame", toHexString(document->frame()));
18 if (!protocol.isNull()) 19 if (!protocol.isNull())
19 value->setString("webSocketProtocol", protocol); 20 value->setString("webSocketProtocol", protocol);
20 setCallStack(value.get()); 21 setCallStack(value.get());
21 return value; 22 return value;
22 } 23 }
23 24
24 PassOwnPtr<TracedValue> InspectorWebSocketEvent::data(Document* document, unsign ed long identifier) 25 std::unique_ptr<TracedValue> InspectorWebSocketEvent::data(Document* document, u nsigned long identifier)
25 { 26 {
26 OwnPtr<TracedValue> value = TracedValue::create(); 27 std::unique_ptr<TracedValue> value = TracedValue::create();
27 value->setInteger("identifier", identifier); 28 value->setInteger("identifier", identifier);
28 value->setString("frame", toHexString(document->frame())); 29 value->setString("frame", toHexString(document->frame()));
29 setCallStack(value.get()); 30 setCallStack(value.get());
30 return value; 31 return value;
31 } 32 }
32 33
33 } // namespace blink 34 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698