Home | History | Annotate | Download | only in base
      1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "jingle/notifier/base/server_information.h"
      6 
      7 #include "base/logging.h"
      8 
      9 namespace notifier {
     10 
     11 ServerInformation::ServerInformation(
     12     const net::HostPortPair& server, SslTcpSupport ssltcp_support)
     13     : server(server), ssltcp_support(ssltcp_support) {
     14   DCHECK(!server.host().empty());
     15   DCHECK_GT(server.port(), 0);
     16 }
     17 
     18 ServerInformation::ServerInformation()
     19     : ssltcp_support(DOES_NOT_SUPPORT_SSLTCP) {}
     20 
     21 ServerInformation::~ServerInformation() {}
     22 
     23 bool ServerInformation::Equals(const ServerInformation& other) const {
     24   return
     25       server.Equals(other.server) &&
     26       (ssltcp_support == other.ssltcp_support);
     27 }
     28 
     29 }  // namespace notifier
     30