OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/dial/dial_registry.h" | 5 #include "chrome/browser/extensions/api/dial/dial_registry.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 NetworkChangeNotifier::AddNetworkChangeObserver(this); | 43 NetworkChangeNotifier::AddNetworkChangeObserver(this); |
44 } | 44 } |
45 | 45 |
46 DialRegistry::~DialRegistry() { | 46 DialRegistry::~DialRegistry() { |
47 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 47 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
48 NetworkChangeNotifier::RemoveNetworkChangeObserver(this); | 48 NetworkChangeNotifier::RemoveNetworkChangeObserver(this); |
49 } | 49 } |
50 | 50 |
51 std::unique_ptr<DialService> DialRegistry::CreateDialService() { | 51 std::unique_ptr<DialService> DialRegistry::CreateDialService() { |
52 DCHECK(g_browser_process->net_log()); | 52 DCHECK(g_browser_process->net_log()); |
53 return base::WrapUnique(new DialServiceImpl(g_browser_process->net_log())); | 53 return base::MakeUnique<DialServiceImpl>(g_browser_process->net_log()); |
54 } | 54 } |
55 | 55 |
56 void DialRegistry::ClearDialService() { | 56 void DialRegistry::ClearDialService() { |
57 dial_.reset(); | 57 dial_.reset(); |
58 } | 58 } |
59 | 59 |
60 base::Time DialRegistry::Now() const { | 60 base::Time DialRegistry::Now() const { |
61 return Time::Now(); | 61 return Time::Now(); |
62 } | 62 } |
63 | 63 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 case NetworkChangeNotifier::CONNECTION_BLUETOOTH: | 325 case NetworkChangeNotifier::CONNECTION_BLUETOOTH: |
326 if (!dial_) { | 326 if (!dial_) { |
327 VLOG(2) << "Connection detected, restarting discovery."; | 327 VLOG(2) << "Connection detected, restarting discovery."; |
328 StartPeriodicDiscovery(); | 328 StartPeriodicDiscovery(); |
329 } | 329 } |
330 break; | 330 break; |
331 } | 331 } |
332 } | 332 } |
333 | 333 |
334 } // namespace extensions | 334 } // namespace extensions |
OLD | NEW |