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

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

Issue 304273004: Add name to services (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get chrome to build Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « mojo/shell/run.cc ('k') | no next file » | 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/shell_test_helper.h" 5 #include "mojo/shell/shell_test_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "mojo/service_manager/service_loader.h" 10 #include "mojo/service_manager/service_loader.h"
(...skipping 30 matching lines...) Expand all
41 } // namespace 41 } // namespace
42 42
43 class ShellTestHelper::TestServiceProvider : public ServiceProvider { 43 class ShellTestHelper::TestServiceProvider : public ServiceProvider {
44 public: 44 public:
45 TestServiceProvider() {} 45 TestServiceProvider() {}
46 virtual ~TestServiceProvider() {} 46 virtual ~TestServiceProvider() {}
47 47
48 // ServiceProvider: 48 // ServiceProvider:
49 virtual void ConnectToService( 49 virtual void ConnectToService(
50 const mojo::String& url, 50 const mojo::String& url,
51 ScopedMessagePipeHandle client_handle) OVERRIDE { 51 const mojo::String& name,
52 } 52 ScopedMessagePipeHandle client_handle) OVERRIDE {}
53 53
54 private: 54 private:
55 DISALLOW_COPY_AND_ASSIGN(TestServiceProvider); 55 DISALLOW_COPY_AND_ASSIGN(TestServiceProvider);
56 }; 56 };
57 57
58 ShellTestHelper::ShellTestHelper() 58 ShellTestHelper::ShellTestHelper()
59 : service_provider_thread_("shell_test_helper"), 59 : service_provider_thread_("shell_test_helper"),
60 state_(NULL) { 60 state_(NULL) {
61 base::CommandLine::Init(0, NULL); 61 base::CommandLine::Init(0, NULL);
62 mojo::shell::InitializeLogging(); 62 mojo::shell::InitializeLogging();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 void ShellTestHelper::OnServiceProviderStarted() { 97 void ShellTestHelper::OnServiceProviderStarted() {
98 DCHECK(state_); 98 DCHECK(state_);
99 local_service_provider_.reset(new TestServiceProvider); 99 local_service_provider_.reset(new TestServiceProvider);
100 service_provider_.Bind(state_->service_provider_handle.Pass()); 100 service_provider_.Bind(state_->service_provider_handle.Pass());
101 service_provider_.set_client(local_service_provider_.get()); 101 service_provider_.set_client(local_service_provider_.get());
102 run_loop_->Quit(); 102 run_loop_->Quit();
103 } 103 }
104 104
105 } // namespace shell 105 } // namespace shell
106 } // namespace mojo 106 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/run.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698