OLD | NEW |
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 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 "net/quic/platform/api/quic_url.h" | 5 #include "net/quic/platform/api/quic_url.h" |
6 | 6 |
7 using base::StringPiece; | |
8 using std::string; | 7 using std::string; |
9 | 8 |
10 namespace net { | 9 namespace net { |
11 | 10 |
12 QuicUrl::QuicUrl(StringPiece url) : impl_(url) {} | 11 QuicUrl::QuicUrl(QuicStringPiece url) : impl_(url) {} |
13 | 12 |
14 QuicUrl::QuicUrl(StringPiece url, StringPiece default_scheme) | 13 QuicUrl::QuicUrl(QuicStringPiece url, QuicStringPiece default_scheme) |
15 : impl_(url, default_scheme) {} | 14 : impl_(url, default_scheme) {} |
16 | 15 |
17 QuicUrl::QuicUrl(const QuicUrl& url) : impl_(url.impl()) {} | 16 QuicUrl::QuicUrl(const QuicUrl& url) : impl_(url.impl()) {} |
18 | 17 |
19 bool QuicUrl::IsValid() const { | 18 bool QuicUrl::IsValid() const { |
20 return impl_.IsValid(); | 19 return impl_.IsValid(); |
21 } | 20 } |
22 | 21 |
23 string QuicUrl::ToString() const { | 22 string QuicUrl::ToString() const { |
24 return impl_.ToStringIfValid(); | 23 return impl_.ToStringIfValid(); |
(...skipping 17 matching lines...) Expand all Loading... |
42 | 41 |
43 string QuicUrl::scheme() const { | 42 string QuicUrl::scheme() const { |
44 return impl_.scheme(); | 43 return impl_.scheme(); |
45 } | 44 } |
46 | 45 |
47 uint16_t QuicUrl::port() const { | 46 uint16_t QuicUrl::port() const { |
48 return impl_.port(); | 47 return impl_.port(); |
49 } | 48 } |
50 | 49 |
51 } // namespace net | 50 } // namespace net |
OLD | NEW |