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

Side by Side Diff: mojo/edk/embedder/test_embedder.cc

Issue 1387963004: Create a broker interface for the new Mojo EDK so that the browser can create and duplicate messa... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: presubmit whitespace error Created 5 years 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
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/edk/embedder/test_embedder.h" 5 #include "mojo/edk/embedder/test_embedder.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/edk/embedder/embedder.h" 9 #include "mojo/edk/embedder/embedder.h"
10 #include "mojo/edk/embedder/embedder_internal.h" 10 #include "mojo/edk/embedder/embedder_internal.h"
11 #include "mojo/edk/embedder/platform_support.h" 11 #include "mojo/edk/embedder/platform_support.h"
12 #include "mojo/edk/system/core.h" 12 #include "mojo/edk/system/core.h"
13 #include "mojo/edk/system/handle_table.h" 13 #include "mojo/edk/system/handle_table.h"
14 14
15 #if defined(OS_WIN)
16 #include "mojo/edk/system/token_serializer_win.h"
17 #endif
18
15 namespace mojo { 19 namespace mojo {
16 20
17 namespace edk { 21 namespace edk {
18 namespace internal { 22 namespace internal {
19 23
20 bool ShutdownCheckNoLeaks(Core* core) { 24 bool ShutdownCheckNoLeaks(Core* core) {
21 // No point in taking the lock. 25 // No point in taking the lock.
22 const HandleTable::HandleToEntryMap& handle_to_entry_map = 26 const HandleTable::HandleToEntryMap& handle_to_entry_map =
23 core->handle_table_.handle_to_entry_map_; 27 core->handle_table_.handle_to_entry_map_;
24 28
(...skipping 15 matching lines...) Expand all
40 bool Shutdown() { 44 bool Shutdown() {
41 CHECK(internal::g_core); 45 CHECK(internal::g_core);
42 bool rv = internal::ShutdownCheckNoLeaks(internal::g_core); 46 bool rv = internal::ShutdownCheckNoLeaks(internal::g_core);
43 delete internal::g_core; 47 delete internal::g_core;
44 internal::g_core = nullptr; 48 internal::g_core = nullptr;
45 49
46 CHECK(internal::g_platform_support); 50 CHECK(internal::g_platform_support);
47 delete internal::g_platform_support; 51 delete internal::g_platform_support;
48 internal::g_platform_support = nullptr; 52 internal::g_platform_support = nullptr;
49 53
54 #if defined(OS_WIN)
55 CHECK(internal::g_token_serializer);
56 delete internal::g_token_serializer;
57 internal::g_token_serializer = nullptr;
58 #endif
59
50 return rv; 60 return rv;
51 } 61 }
52 62
53 } // namespace test 63 } // namespace test
54 } // namespace edk 64 } // namespace edk
55 65
56 } // namespace mojo 66 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698