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

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

Issue 2961733002: [CrOS Tether] Remove spammy log from Initializer. (Closed)
Patch Set: hansberry@ comments. Created 3 years, 5 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 | « chromeos/components/tether/initializer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "chromeos/components/tether/active_host.h" 8 #include "chromeos/components/tether/active_host.h"
9 #include "chromeos/components/tether/active_host_network_state_updater.h" 9 #include "chromeos/components/tether/active_host_network_state_updater.h"
10 #include "chromeos/components/tether/ble_connection_manager.h" 10 #include "chromeos/components/tether/ble_connection_manager.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 cryptauth::CryptAuthService* cryptauth_service, 57 cryptauth::CryptAuthService* cryptauth_service,
58 std::unique_ptr<NotificationPresenter> notification_presenter, 58 std::unique_ptr<NotificationPresenter> notification_presenter,
59 PrefService* pref_service, 59 PrefService* pref_service,
60 ProfileOAuth2TokenService* token_service, 60 ProfileOAuth2TokenService* token_service,
61 NetworkStateHandler* network_state_handler, 61 NetworkStateHandler* network_state_handler,
62 ManagedNetworkConfigurationHandler* managed_network_configuration_handler, 62 ManagedNetworkConfigurationHandler* managed_network_configuration_handler,
63 NetworkConnect* network_connect, 63 NetworkConnect* network_connect,
64 NetworkConnectionHandler* network_connection_handler) { 64 NetworkConnectionHandler* network_connection_handler) {
65 if (!device::BluetoothAdapterFactory::IsBluetoothSupported()) { 65 if (!device::BluetoothAdapterFactory::IsBluetoothSupported()) {
66 PA_LOG(WARNING) << "Bluetooth is not supported on this device; cannot " 66 PA_LOG(WARNING) << "Bluetooth is not supported on this device; cannot "
67 << "initialize tether feature."; 67 << "initialize Tether feature.";
68 return; 68 return;
69 } 69 }
70 70
71 if (instance_) { 71 if (instance_) {
72 PA_LOG(WARNING) << "Tether initialization was triggered when the feature " 72 // The Tether feature has already been initialized. No need to do anything.
73 << "had already been initialized; exiting initialization "
74 << "early.";
75 return; 73 return;
76 } 74 }
77 75
76 PA_LOG(INFO) << "Initializing Tether feature.";
78 instance_ = 77 instance_ =
79 new Initializer(cryptauth_service, std::move(notification_presenter), 78 new Initializer(cryptauth_service, std::move(notification_presenter),
80 pref_service, token_service, network_state_handler, 79 pref_service, token_service, network_state_handler,
81 managed_network_configuration_handler, network_connect, 80 managed_network_configuration_handler, network_connect,
82 network_connection_handler); 81 network_connection_handler);
83 } 82 }
84 83
85 // static 84 // static
86 void Initializer::Shutdown() { 85 void Initializer::Shutdown() {
87 if (instance_) { 86 if (instance_) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 243
245 void Initializer::OnBluetoothAdapterAdvertisingIntervalError( 244 void Initializer::OnBluetoothAdapterAdvertisingIntervalError(
246 device::BluetoothAdvertisement::ErrorCode status) { 245 device::BluetoothAdvertisement::ErrorCode status) {
247 PA_LOG(ERROR) << "Failed to set Bluetooth advertisement interval; " 246 PA_LOG(ERROR) << "Failed to set Bluetooth advertisement interval; "
248 << "cannot use tether feature. Error code: " << status; 247 << "cannot use tether feature. Error code: " << status;
249 } 248 }
250 249
251 } // namespace tether 250 } // namespace tether
252 251
253 } // namespace chromeos 252 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/components/tether/initializer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698