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

Side by Side Diff: chrome/browser/extensions/api/mdns/dns_sd_registry.cc

Issue 195983023: Enable devices page UI on MacOSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_dcheck
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/extensions/api/mdns/dns_sd_registry.h" 5 #include "chrome/browser/extensions/api/mdns/dns_sd_registry.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/browser/extensions/api/mdns/dns_sd_device_lister.h" 8 #include "chrome/browser/extensions/api/mdns/dns_sd_device_lister.h"
9 #include "chrome/browser/local_discovery/service_discovery_shared_client.h" 9 #include "chrome/browser/local_discovery/service_discovery_shared_client.h"
10 10
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 service_list_.clear(); 92 service_list_.clear();
93 return true; 93 return true;
94 } 94 }
95 95
96 const DnsSdRegistry::DnsSdServiceList& 96 const DnsSdRegistry::DnsSdServiceList&
97 DnsSdRegistry::ServiceTypeData::GetServiceList() { 97 DnsSdRegistry::ServiceTypeData::GetServiceList() {
98 return service_list_; 98 return service_list_;
99 } 99 }
100 100
101 DnsSdRegistry::DnsSdRegistry() { 101 DnsSdRegistry::DnsSdRegistry() {
102 #if defined(ENABLE_MDNS) || defined(OS_MACOSX) 102 #if defined(ENABLE_SERVICE_DISCOVERY)
103 service_discovery_client_ = ServiceDiscoverySharedClient::GetInstance(); 103 service_discovery_client_ = ServiceDiscoverySharedClient::GetInstance();
104 #endif 104 #endif
105 } 105 }
106 106
107 DnsSdRegistry::DnsSdRegistry(ServiceDiscoverySharedClient* client) { 107 DnsSdRegistry::DnsSdRegistry(ServiceDiscoverySharedClient* client) {
108 service_discovery_client_ = client; 108 service_discovery_client_ = client;
109 } 109 }
110 110
111 DnsSdRegistry::~DnsSdRegistry() {} 111 DnsSdRegistry::~DnsSdRegistry() {}
112 112
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 VLOG(1) << "DispatchApiEvent: service_type: " << service_type; 214 VLOG(1) << "DispatchApiEvent: service_type: " << service_type;
215 FOR_EACH_OBSERVER(DnsSdObserver, observers_, OnDnsSdEvent( 215 FOR_EACH_OBSERVER(DnsSdObserver, observers_, OnDnsSdEvent(
216 service_type, service_data_map_[service_type]->GetServiceList())); 216 service_type, service_data_map_[service_type]->GetServiceList()));
217 } 217 }
218 218
219 bool DnsSdRegistry::IsRegistered(const std::string& service_type) { 219 bool DnsSdRegistry::IsRegistered(const std::string& service_type) {
220 return service_data_map_.find(service_type) != service_data_map_.end(); 220 return service_data_map_.find(service_type) != service_data_map_.end();
221 } 221 }
222 222
223 } // namespace extensions 223 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/local_discovery/privet_http_asynchronous_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698