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

Side by Side Diff: dbus/object_manager_unittest.cc

Issue 1867253002: Convert //dbus from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixes in //device 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
« no previous file with comments | « dbus/object_manager.cc ('k') | dbus/object_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "dbus/object_manager.h" 5 #include "dbus/object_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 writer.AppendObjectPath(object_path); 198 writer.AppendObjectPath(object_path);
199 199
200 object_proxy->CallMethod(&method_call, 200 object_proxy->CallMethod(&method_call,
201 ObjectProxy::TIMEOUT_USE_DEFAULT, 201 ObjectProxy::TIMEOUT_USE_DEFAULT,
202 base::Bind(&ObjectManagerTest::MethodCallback, 202 base::Bind(&ObjectManagerTest::MethodCallback,
203 base::Unretained(this))); 203 base::Unretained(this)));
204 WaitForMethodCallback(); 204 WaitForMethodCallback();
205 } 205 }
206 206
207 base::MessageLoop message_loop_; 207 base::MessageLoop message_loop_;
208 scoped_ptr<base::RunLoop> run_loop_; 208 std::unique_ptr<base::RunLoop> run_loop_;
209 scoped_ptr<base::Thread> dbus_thread_; 209 std::unique_ptr<base::Thread> dbus_thread_;
210 scoped_refptr<Bus> bus_; 210 scoped_refptr<Bus> bus_;
211 ObjectManager* object_manager_; 211 ObjectManager* object_manager_;
212 scoped_ptr<TestService> test_service_; 212 std::unique_ptr<TestService> test_service_;
213 213
214 std::string last_name_value_; 214 std::string last_name_value_;
215 bool timeout_expired_; 215 bool timeout_expired_;
216 216
217 std::vector<std::pair<ObjectPath, std::string> > added_objects_; 217 std::vector<std::pair<ObjectPath, std::string> > added_objects_;
218 std::vector<std::pair<ObjectPath, std::string> > removed_objects_; 218 std::vector<std::pair<ObjectPath, std::string> > removed_objects_;
219 std::vector<std::string> updated_properties_; 219 std::vector<std::string> updated_properties_;
220 220
221 bool method_callback_called_; 221 bool method_callback_called_;
222 }; 222 };
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 base::Unretained(this)), 410 base::Unretained(this)),
411 base::TimeDelta::FromSeconds(2)); 411 base::TimeDelta::FromSeconds(2));
412 412
413 while (last_name_value_ != "ChangedTestServiceName" && !timeout_expired_) { 413 while (last_name_value_ != "ChangedTestServiceName" && !timeout_expired_) {
414 run_loop_.reset(new base::RunLoop); 414 run_loop_.reset(new base::RunLoop);
415 run_loop_->Run(); 415 run_loop_->Run();
416 } 416 }
417 } 417 }
418 418
419 } // namespace dbus 419 } // namespace dbus
OLDNEW
« no previous file with comments | « dbus/object_manager.cc ('k') | dbus/object_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698