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

Side by Side Diff: mojo/shell/application_manager_unittest.cc

Issue 1691493002: Revise comments on various Shell interfaces. Make some methods private on ShellConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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 | « no previous file | mojo/shell/public/cpp/app_lifetime_helper.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/shell/application_manager.h" 5 #include "mojo/shell/application_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 int num_c_deletes_; 238 int num_c_deletes_;
239 bool tester_called_quit_; 239 bool tester_called_quit_;
240 bool a_called_quit_; 240 bool a_called_quit_;
241 241
242 base::MessageLoop* loop_; 242 base::MessageLoop* loop_;
243 }; 243 };
244 244
245 // Used to test that the requestor url will be correctly passed. 245 // Used to test that the requestor url will be correctly passed.
246 class TestAImpl : public TestA { 246 class TestAImpl : public TestA {
247 public: 247 public:
248 TestAImpl(ShellConnection* app_impl, 248 TestAImpl(Shell* shell,
249 TesterContext* test_context, 249 TesterContext* test_context,
250 InterfaceRequest<TestA> request, 250 InterfaceRequest<TestA> request,
251 InterfaceFactory<TestC>* factory) 251 InterfaceFactory<TestC>* factory)
252 : test_context_(test_context), binding_(this, std::move(request)) { 252 : test_context_(test_context), binding_(this, std::move(request)) {
253 connection_ = app_impl->Connect(kTestBURLString); 253 connection_ = shell->Connect(kTestBURLString);
254 connection_->AddInterface<TestC>(factory); 254 connection_->AddInterface<TestC>(factory);
255 connection_->GetInterface(&b_); 255 connection_->GetInterface(&b_);
256 } 256 }
257 257
258 ~TestAImpl() override { 258 ~TestAImpl() override {
259 test_context_->IncrementNumADeletes(); 259 test_context_->IncrementNumADeletes();
260 if (base::MessageLoop::current()->is_running()) 260 if (base::MessageLoop::current()->is_running())
261 Quit(); 261 Quit();
262 } 262 }
263 263
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 621
622 // A different identity because the domain is different. 622 // A different identity because the domain is different.
623 ConnectToInterface(application_manager_.get(), 623 ConnectToInterface(application_manager_.get(),
624 GURL("http://www.another_domain.org/abc"), &test_service); 624 GURL("http://www.another_domain.org/abc"), &test_service);
625 EXPECT_EQ(4, test_loader_->num_loads()); 625 EXPECT_EQ(4, test_loader_->num_loads());
626 } 626 }
627 627
628 } // namespace test 628 } // namespace test
629 } // namespace shell 629 } // namespace shell
630 } // namespace mojo 630 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/shell/public/cpp/app_lifetime_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698