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

Side by Side Diff: mojo/public/utility/environment.cc

Issue 128803002: Mojo: Remove utility:: namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build 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/public/utility/environment.h ('k') | mojo/public/utility/run_loop.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/public/utility/environment.h" 5 #include "mojo/public/utility/environment.h"
6 6
7 #include "mojo/public/utility/bindings_support_impl.h" 7 #include "mojo/public/utility/bindings_support_impl.h"
8 #include "mojo/public/utility/run_loop.h" 8 #include "mojo/public/utility/run_loop.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 namespace utility {
12 11
13 Environment::Environment() : bindings_support_(NULL) { 12 Environment::Environment() : bindings_support_(NULL) {
14 RunLoop::SetUp(); 13 RunLoop::SetUp();
15 14
16 internal::BindingsSupportImpl::SetUp(); 15 internal::BindingsSupportImpl::SetUp();
17 bindings_support_ = new internal::BindingsSupportImpl; 16 bindings_support_ = new internal::BindingsSupportImpl;
18 BindingsSupport::Set(bindings_support_); 17 BindingsSupport::Set(bindings_support_);
19 } 18 }
20 19
21 Environment::~Environment() { 20 Environment::~Environment() {
22 // Allow for someone to have replaced BindingsSupport. 21 // Allow for someone to have replaced BindingsSupport.
23 if (BindingsSupport::Get() == bindings_support_) 22 if (BindingsSupport::Get() == bindings_support_)
24 BindingsSupport::Set(NULL); 23 BindingsSupport::Set(NULL);
25 delete bindings_support_; 24 delete bindings_support_;
26 internal::BindingsSupportImpl::TearDown(); 25 internal::BindingsSupportImpl::TearDown();
27 26
28 RunLoop::TearDown(); 27 RunLoop::TearDown();
29 } 28 }
30 29
31 } // namespace utility
32 } // namespace mojo 30 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/utility/environment.h ('k') | mojo/public/utility/run_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698