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

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

Issue 122173004: Add test for ServiceManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update new copyrights Created 6 years, 11 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/context.h ('k') | mojo/shell/dynamic_service_loader.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "mojo/shell/context.h" 5 #include "mojo/shell/context.h"
6 6
7 #include "mojo/shell/dynamic_service_loader.h"
7 #include "mojo/shell/network_delegate.h" 8 #include "mojo/shell/network_delegate.h"
8 #include "mojo/system/core_impl.h" 9 #include "mojo/system/core_impl.h"
9 10
10 namespace mojo { 11 namespace mojo {
11 namespace shell { 12 namespace shell {
12 13
13 Context::Context() 14 Context::Context()
14 : task_runners_(base::MessageLoop::current()->message_loop_proxy()), 15 : task_runners_(base::MessageLoop::current()->message_loop_proxy()),
15 storage_(), 16 storage_(),
16 loader_(task_runners_.io_runner(), 17 loader_(task_runners_.io_runner(),
17 task_runners_.file_runner(), 18 task_runners_.file_runner(),
18 task_runners_.cache_runner(), 19 task_runners_.cache_runner(),
19 scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()), 20 scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()),
20 storage_.profile_path()) { 21 storage_.profile_path()) {
21 system::CoreImpl::Init(); 22 system::CoreImpl::Init();
22 BindingsSupport::Set(&bindings_support_impl_); 23 BindingsSupport::Set(&bindings_support_impl_);
23 service_manager_.reset(new ServiceManager(this)); 24 dynamic_service_loader_.reset(new DynamicServiceLoader(this));
25 service_manager_.set_default_loader(dynamic_service_loader_.get());
24 } 26 }
25 27
26 Context::~Context() { 28 Context::~Context() {
29 service_manager_.set_default_loader(NULL);
27 BindingsSupport::Set(NULL); 30 BindingsSupport::Set(NULL);
28 } 31 }
29 32
30 } // namespace shell 33 } // namespace shell
31 } // namespace mojo 34 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/context.h ('k') | mojo/shell/dynamic_service_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698