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

Unified Diff: net/quic/quic_server_id.cc

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_server_id.h ('k') | net/quic/quic_server_id_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_server_id.cc
diff --git a/net/quic/quic_server_id.cc b/net/quic/quic_server_id.cc
deleted file mode 100644
index b810bb3745bf87a77e2adcaebcaffc352a57edf5..0000000000000000000000000000000000000000
--- a/net/quic/quic_server_id.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/quic/quic_server_id.h"
-
-#include <tuple>
-
-#include "base/logging.h"
-#include "net/base/host_port_pair.h"
-#include "net/base/port_util.h"
-#include "url/gurl.h"
-
-using std::string;
-
-namespace net {
-
-QuicServerId::QuicServerId() : privacy_mode_(PRIVACY_MODE_DISABLED) {}
-
-QuicServerId::QuicServerId(const HostPortPair& host_port_pair,
- PrivacyMode privacy_mode)
- : host_port_pair_(host_port_pair), privacy_mode_(privacy_mode) {}
-
-QuicServerId::QuicServerId(const string& host, uint16_t port)
- : host_port_pair_(host, port), privacy_mode_(PRIVACY_MODE_DISABLED) {}
-
-QuicServerId::QuicServerId(const string& host,
- uint16_t port,
- PrivacyMode privacy_mode)
- : host_port_pair_(host, port), privacy_mode_(privacy_mode) {}
-
-QuicServerId::~QuicServerId() {}
-
-bool QuicServerId::operator<(const QuicServerId& other) const {
- return std::tie(host_port_pair_, privacy_mode_) <
- std::tie(other.host_port_pair_, other.privacy_mode_);
-}
-
-bool QuicServerId::operator==(const QuicServerId& other) const {
- return privacy_mode_ == other.privacy_mode_ &&
- host_port_pair_.Equals(other.host_port_pair_);
-}
-
-// static
-QuicServerId QuicServerId::FromString(const std::string& str) {
- GURL url(str);
- if (!url.is_valid())
- return QuicServerId();
- return QuicServerId(HostPortPair::FromURL(url), url.path() == "/private"
- ? PRIVACY_MODE_ENABLED
- : PRIVACY_MODE_DISABLED);
-}
-
-string QuicServerId::ToString() const {
- return "https://" + host_port_pair_.ToString() +
- (privacy_mode_ == PRIVACY_MODE_ENABLED ? "/private" : "");
-}
-
-} // namespace net
« no previous file with comments | « net/quic/quic_server_id.h ('k') | net/quic/quic_server_id_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698