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

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

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chrome/browser/extensions/api/dial/dial_device_data.h" 9 #include "chrome/browser/extensions/api/dial/dial_device_data.h"
10 #include "chrome/browser/extensions/api/dial/dial_registry.h" 10 #include "chrome/browser/extensions/api/dial/dial_registry.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 third_device_("third", GURL("http://127.0.0.3/dd.xml"), Time::Now()) { 87 third_device_("third", GURL("http://127.0.0.3/dd.xml"), Time::Now()) {
88 registry_.reset(new MockDialRegistry(&mock_observer_, 88 registry_.reset(new MockDialRegistry(&mock_observer_,
89 TimeDelta::FromSeconds(1000), 89 TimeDelta::FromSeconds(1000),
90 TimeDelta::FromSeconds(10), 90 TimeDelta::FromSeconds(10),
91 10)); 91 10));
92 list_with_first_device_.push_back(first_device_); 92 list_with_first_device_.push_back(first_device_);
93 list_with_second_device_.push_back(second_device_); 93 list_with_second_device_.push_back(second_device_);
94 } 94 }
95 95
96 protected: 96 protected:
97 scoped_ptr<MockDialRegistry> registry_; 97 std::unique_ptr<MockDialRegistry> registry_;
98 MockDialObserver mock_observer_; 98 MockDialObserver mock_observer_;
99 const DialDeviceData first_device_; 99 const DialDeviceData first_device_;
100 const DialDeviceData second_device_; 100 const DialDeviceData second_device_;
101 const DialDeviceData third_device_; 101 const DialDeviceData third_device_;
102 102
103 const DialRegistry::DeviceList empty_list_; 103 const DialRegistry::DeviceList empty_list_;
104 DialRegistry::DeviceList list_with_first_device_; 104 DialRegistry::DeviceList list_with_first_device_;
105 DialRegistry::DeviceList list_with_second_device_; 105 DialRegistry::DeviceList list_with_second_device_;
106 106
107 // Must instantiate a MessageLoop for the thread, as the registry starts a 107 // Must instantiate a MessageLoop for the thread, as the registry starts a
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 registry_->OnNetworkChanged(net::NetworkChangeNotifier::CONNECTION_ETHERNET); 368 registry_->OnNetworkChanged(net::NetworkChangeNotifier::CONNECTION_ETHERNET);
369 369
370 registry_->OnDiscoveryRequest(NULL); 370 registry_->OnDiscoveryRequest(NULL);
371 registry_->OnDeviceDiscovered(NULL, third_device_); 371 registry_->OnDeviceDiscovered(NULL, third_device_);
372 registry_->OnDiscoveryFinished(NULL); 372 registry_->OnDiscoveryFinished(NULL);
373 373
374 registry_->OnListenerRemoved(); 374 registry_->OnListenerRemoved();
375 } 375 }
376 376
377 } // namespace extensions 377 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/dial/dial_registry.cc ('k') | chrome/browser/extensions/api/dial/dial_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698