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

Side by Side Diff: net/quic/platform/api/quic_url.cc

Issue 2740453006: Add QuicStringPiece which is actually StringPiece. (Closed)
Patch Set: fix compile error and rebase Created 3 years, 9 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
« no previous file with comments | « net/quic/platform/api/quic_url.h ('k') | net/quic/platform/api/quic_url_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/quic/platform/api/quic_url.h ('k') | net/quic/platform/api/quic_url_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698