| Index: blimp/client/public/session/assignment.cc
|
| diff --git a/blimp/client/public/session/assignment.cc b/blimp/client/public/session/assignment.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..333875fb2e07f0f8259853e2508ba73c84472225
|
| --- /dev/null
|
| +++ b/blimp/client/public/session/assignment.cc
|
| @@ -0,0 +1,30 @@
|
| +// Copyright 2016 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 "blimp/client/public/session/assignment.h"
|
| +
|
| +#include "net/cert/x509_certificate.h"
|
| +
|
| +namespace blimp {
|
| +namespace client {
|
| +
|
| +Assignment::Assignment() : transport_protocol(TransportProtocol::UNKNOWN) {}
|
| +
|
| +Assignment::Assignment(const Assignment& other) = default;
|
| +
|
| +Assignment::~Assignment() {}
|
| +
|
| +bool Assignment::IsValid() const {
|
| + if (engine_endpoint.address().empty() || engine_endpoint.port() == 0 ||
|
| + transport_protocol == TransportProtocol::UNKNOWN) {
|
| + return false;
|
| + }
|
| + if (transport_protocol == TransportProtocol::SSL && !cert) {
|
| + return false;
|
| + }
|
| + return true;
|
| +}
|
| +
|
| +} // namespace client
|
| +} // namespace blimp
|
|
|