Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / common / local_discovery / service_discovery_client.cc
blob36faf6dbcfb87e1bc1fd375dac764ca4bff39a1b
1 // Copyright 2013 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.
5 #include "chrome/common/local_discovery/service_discovery_client.h"
7 namespace local_discovery {
9 ServiceDescription::ServiceDescription() {
12 ServiceDescription::~ServiceDescription() {
15 std::string ServiceDescription::instance_name() const {
16 // TODO(noamsml): Once we have escaping working, get this to
17 // parse escaped domains.
18 size_t first_period = service_name.find_first_of('.');
19 return service_name.substr(0, first_period);
22 std::string ServiceDescription::service_type() const {
23 // TODO(noamsml): Once we have escaping working, get this to
24 // parse escaped domains.
25 size_t first_period = service_name.find_first_of('.');
26 if (first_period == std::string::npos)
27 return "";
28 return service_name.substr(first_period+1);
31 } // namespace local_discovery