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

Side by Side Diff: chromeos/components/tether/initializer_unittest.cc

Issue 2870393003: Tether: only scan when asked to by NetworkStateHandler. (Closed)
Patch Set: Remove PowerManagerClient callbacks and implement all NetworkStateHandler callbacks. Created 3 years, 7 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "chromeos/components/tether/initializer.h" 5 #include "chromeos/components/tether/initializer.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 class InitializerTest : public NetworkStateTest { 118 class InitializerTest : public NetworkStateTest {
119 protected: 119 protected:
120 InitializerTest() : NetworkStateTest() {} 120 InitializerTest() : NetworkStateTest() {}
121 ~InitializerTest() override {} 121 ~InitializerTest() override {}
122 122
123 void SetUp() override { 123 void SetUp() override {
124 DBusThreadManager::Initialize(); 124 DBusThreadManager::Initialize();
125 NetworkHandler::Initialize(); 125 NetworkHandler::Initialize();
126 NetworkStateTest::SetUp(); 126 NetworkStateTest::SetUp();
127 127
128 network_state_handler()->SetTetherTechnologyState(
129 NetworkStateHandler::TECHNOLOGY_ENABLED);
130
128 test_pref_service_ = base::MakeUnique<TestingPrefServiceSimple>(); 131 test_pref_service_ = base::MakeUnique<TestingPrefServiceSimple>();
129 Initializer::RegisterProfilePrefs(test_pref_service_->registry()); 132 Initializer::RegisterProfilePrefs(test_pref_service_->registry());
130 } 133 }
131 134
132 void TearDown() override { 135 void TearDown() override {
133 ShutdownNetworkState(); 136 ShutdownNetworkState();
134 NetworkStateTest::TearDown(); 137 NetworkStateTest::TearDown();
135 DBusThreadManager::Shutdown(); 138 DBusThreadManager::Shutdown();
136 } 139 }
137 140
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 fake_cryptauth_service.get(), 215 fake_cryptauth_service.get(),
213 base::MakeUnique<FakeNotificationPresenter>(), test_pref_service_.get(), 216 base::MakeUnique<FakeNotificationPresenter>(), test_pref_service_.get(),
214 fake_token_service.get(), network_state_handler(), 217 fake_token_service.get(), network_state_handler(),
215 managed_network_configuration_handler.get(), mock_network_connect.get(), 218 managed_network_configuration_handler.get(), mock_network_connect.get(),
216 network_connection_handler_.get(), mock_adapter); 219 network_connection_handler_.get(), mock_adapter);
217 } 220 }
218 221
219 } // namespace tether 222 } // namespace tether
220 223
221 } // namespace chromeos 224 } // namespace chromeos
OLDNEW
« chromeos/components/tether/initializer.cc ('K') | « chromeos/components/tether/initializer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698