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

Side by Side Diff: content/renderer/presentation/presentation_connection_client.cc

Issue 2327993002: [PresentationAPI] Use KURL and WebURL in place of string types. (Closed)
Patch Set: Rebase. Fix PresentationReceiverTest Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/renderer/presentation/presentation_connection_client.h" 5 #include "content/renderer/presentation/presentation_connection_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/WebKit/public/platform/WebString.h" 8 #include "third_party/WebKit/public/platform/WebString.h"
9 #include "third_party/WebKit/public/platform/WebURL.h"
9 10
10 namespace content { 11 namespace content {
11 12
12 PresentationConnectionClient::PresentationConnectionClient( 13 PresentationConnectionClient::PresentationConnectionClient(
13 blink::mojom::PresentationSessionInfoPtr session_info) 14 blink::mojom::PresentationSessionInfoPtr session_info)
14 : url_(blink::WebString::fromUTF8(session_info->url.spec())), 15 : url_(blink::WebURL(session_info->url)),
imcheng 2016/09/14 00:39:13 nit: can this url_(session_info->url) ?
mark a. foltz 2016/09/14 20:02:42 Done.
15 id_(blink::WebString::fromUTF8(session_info->id)) {} 16 id_(blink::WebString::fromUTF8(session_info->id)) {}
16 17
17 PresentationConnectionClient::PresentationConnectionClient( 18 PresentationConnectionClient::PresentationConnectionClient(
18 const GURL& url, 19 const GURL& url,
19 const mojo::String& id) 20 const mojo::String& id)
20 : url_(blink::WebString::fromUTF8(url.spec())), 21 : url_(blink::WebURL(url)),
imcheng 2016/09/14 00:39:13 ditto
mark a. foltz 2016/09/14 20:02:41 Done.
21 id_(blink::WebString::fromUTF8(id)) {} 22 id_(blink::WebString::fromUTF8(id)) {}
22 23
23 PresentationConnectionClient::~PresentationConnectionClient() { 24 PresentationConnectionClient::~PresentationConnectionClient() {
24 } 25 }
25 26
26 blink::WebString PresentationConnectionClient::getUrl() { 27 blink::WebURL PresentationConnectionClient::getUrl() {
27 return url_; 28 return url_;
28 } 29 }
29 30
30 blink::WebString PresentationConnectionClient::getId() { 31 blink::WebString PresentationConnectionClient::getId() {
31 return id_; 32 return id_;
32 } 33 }
33 34
34 } // namespace content 35 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698