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

Side by Side Diff: chrome/browser/extensions/api/dial/dial_registry.cc

Issue 2257113002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 (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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698