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

Side by Side Diff: ash/mus/window_manager_application.cc

Issue 2772513003: Makes AshTestHelper shutdown ChromeOS NetworkHandler (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | ash/shelf/shelf_view_unittest.cc » ('j') | ash/test/ash_test_helper.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ash/mus/window_manager_application.h" 5 #include "ash/mus/window_manager_application.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/mojo_interface_factory.h" 9 #include "ash/common/mojo_interface_factory.h"
10 #include "ash/common/system/chromeos/power/power_status.h" 10 #include "ash/common/system/chromeos/power/power_status.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 chromeos::NetworkConnect::Initialize(network_connect_delegate_.get()); 92 chromeos::NetworkConnect::Initialize(network_connect_delegate_.get());
93 // TODO(jamescook): Initialize real audio handler. 93 // TODO(jamescook): Initialize real audio handler.
94 chromeos::CrasAudioHandler::InitializeForTesting(); 94 chromeos::CrasAudioHandler::InitializeForTesting();
95 } 95 }
96 96
97 void WindowManagerApplication::ShutdownComponents() { 97 void WindowManagerApplication::ShutdownComponents() {
98 // NOTE: PowerStatus is shutdown by Shell. 98 // NOTE: PowerStatus is shutdown by Shell.
99 chromeos::CrasAudioHandler::Shutdown(); 99 chromeos::CrasAudioHandler::Shutdown();
100 chromeos::NetworkConnect::Shutdown(); 100 chromeos::NetworkConnect::Shutdown();
101 network_connect_delegate_.reset(); 101 network_connect_delegate_.reset();
102 chromeos::NetworkHandler::Shutdown(); 102 // Tests may explicitly shutdown the NetworkHandler.
103 if (chromeos::NetworkHandler::IsInitialized())
104 chromeos::NetworkHandler::Shutdown();
103 device::BluetoothAdapterFactory::Shutdown(); 105 device::BluetoothAdapterFactory::Shutdown();
104 bluez::BluezDBusManager::Shutdown(); 106 bluez::BluezDBusManager::Shutdown();
105 chromeos::DBusThreadManager::Shutdown(); 107 chromeos::DBusThreadManager::Shutdown();
106 message_center::MessageCenter::Shutdown(); 108 message_center::MessageCenter::Shutdown();
107 } 109 }
108 110
109 void WindowManagerApplication::OnStart() { 111 void WindowManagerApplication::OnStart() {
110 aura_init_ = base::MakeUnique<views::AuraInit>( 112 aura_init_ = base::MakeUnique<views::AuraInit>(
111 context()->connector(), context()->identity(), "ash_mus_resources.pak", 113 context()->connector(), context()->identity(), "ash_mus_resources.pak",
112 "ash_mus_resources_200.pak", nullptr, 114 "ash_mus_resources_200.pak", nullptr,
(...skipping 18 matching lines...) Expand all
131 const service_manager::ServiceInfo& remote_info, 133 const service_manager::ServiceInfo& remote_info,
132 service_manager::InterfaceRegistry* registry) { 134 service_manager::InterfaceRegistry* registry) {
133 // Register services used in both classic ash and mash. 135 // Register services used in both classic ash and mash.
134 mojo_interface_factory::RegisterInterfaces( 136 mojo_interface_factory::RegisterInterfaces(
135 registry, base::ThreadTaskRunnerHandle::Get()); 137 registry, base::ThreadTaskRunnerHandle::Get());
136 return true; 138 return true;
137 } 139 }
138 140
139 } // namespace mus 141 } // namespace mus
140 } // namespace ash 142 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf_view_unittest.cc » ('j') | ash/test/ash_test_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698