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

Side by Side Diff: services/service_manager/public/cpp/lib/service_test.cc

Issue 2762333003: Pref service: add a factory to create the client lib (Closed)
Patch Set: Address more review comments from sammc@ Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/service_manager/public/cpp/service_test.h" 5 #include "services/service_manager/public/cpp/service_test.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 context_ = base::MakeUnique<ServiceContext>(CreateService(), 82 context_ = base::MakeUnique<ServiceContext>(CreateService(),
83 mojom::ServiceRequest(&service)); 83 mojom::ServiceRequest(&service));
84 background_service_manager_->RegisterService( 84 background_service_manager_->RegisterService(
85 Identity(test_name_, mojom::kRootUserID), std::move(service), nullptr); 85 Identity(test_name_, mojom::kRootUserID), std::move(service), nullptr);
86 connector_ = context_->connector(); 86 connector_ = context_->connector();
87 run_loop.Run(); 87 run_loop.Run();
88 } 88 }
89 89
90 void ServiceTest::TearDown() { 90 void ServiceTest::TearDown() {
91 background_service_manager_.reset(); 91 background_service_manager_.reset();
92 context_.reset();
92 message_loop_.reset(); 93 message_loop_.reset();
93 context_.reset();
94 } 94 }
95 95
96 } // namespace test 96 } // namespace test
97 } // namespace service_manager 97 } // namespace service_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698