Clang roll script: fix error when GYP_DEFINES isn't defined
[chromium-blink-merge.git] / mojo / shell / context.cc
blobc9b664cd4d467533700d8b04b5256daeba514b87
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
3 // found in the LICENSE file.
5 #include "mojo/shell/context.h"
7 #include "mojo/shell/dynamic_service_loader.h"
8 #include "mojo/shell/network_delegate.h"
9 #include "mojo/system/embedder/embedder.h"
11 namespace mojo {
12 namespace shell {
14 Context::Context()
15 : task_runners_(base::MessageLoop::current()->message_loop_proxy()),
16 storage_(),
17 loader_(task_runners_.io_runner(),
18 task_runners_.file_runner(),
19 task_runners_.cache_runner(),
20 scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()),
21 storage_.profile_path()) {
22 embedder::Init();
23 dynamic_service_loader_.reset(new DynamicServiceLoader(this));
24 service_manager_.set_default_loader(dynamic_service_loader_.get());
27 Context::~Context() {
28 service_manager_.set_default_loader(NULL);
31 } // namespace shell
32 } // namespace mojo