diff --git a/ash/multi_device_setup/multi_device_notification_presenter.cc b/ash/multi_device_setup/multi_device_notification_presenter.cc index 7e2939d4a637f6..9df291318642b1 100644 --- a/ash/multi_device_setup/multi_device_notification_presenter.cc +++ b/ash/multi_device_setup/multi_device_notification_presenter.cc @@ -203,9 +203,9 @@ void MultiDeviceNotificationPresenter::ObserveMultiDeviceSetupIfPossible() { void MultiDeviceNotificationPresenter::OnNotificationClicked() { DCHECK(notification_status_ != Status::kNoNotificationVisible); - PA_LOG(INFO) << "User clicked " - << GetNotificationDescriptionForLogging(notification_status_) - << "."; + PA_LOG(VERBOSE) << "User clicked " + << GetNotificationDescriptionForLogging(notification_status_) + << "."; UMA_HISTOGRAM_ENUMERATION("MultiDeviceSetup_NotificationClicked", GetMetricValueForNotification(notification_status_), kNotificationTypeMax); @@ -230,9 +230,9 @@ void MultiDeviceNotificationPresenter::ShowNotification( const Status notification_status, const base::string16& title, const base::string16& message) { - PA_LOG(INFO) << "Showing " - << GetNotificationDescriptionForLogging(notification_status) - << "."; + PA_LOG(VERBOSE) << "Showing " + << GetNotificationDescriptionForLogging(notification_status) + << "."; UMA_HISTOGRAM_ENUMERATION("MultiDeviceSetup_NotificationShown", GetMetricValueForNotification(notification_status), kNotificationTypeMax); diff --git a/chrome/browser/chromeos/android_sms/connection_establisher_impl.cc b/chrome/browser/chromeos/android_sms/connection_establisher_impl.cc index e1e576a2f29d8d..590ea0a510ae32 100644 --- a/chrome/browser/chromeos/android_sms/connection_establisher_impl.cc +++ b/chrome/browser/chromeos/android_sms/connection_establisher_impl.cc @@ -40,8 +40,8 @@ void ConnectionEstablisherImpl::SendStartStreamingMessageIfNotConnected( ConnectionMode connection_mode) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); if (is_connected_) { - PA_LOG(INFO) << "Connection already exists. Skipped sending start " - "streaming message to service worker."; + PA_LOG(VERBOSE) << "Connection already exists. Skipped sending start " + "streaming message to service worker."; return; } @@ -58,7 +58,7 @@ void ConnectionEstablisherImpl::SendStartStreamingMessageIfNotConnected( } msg.encoded_message = msg.owned_encoded_message; - PA_LOG(INFO) << "Dispatching start streaming message to service worker."; + PA_LOG(VERBOSE) << "Dispatching start streaming message to service worker."; is_connected_ = true; service_worker_context->StartServiceWorkerAndDispatchLongRunningMessage( GetAndroidMessagesURL(), std::move(msg), @@ -70,8 +70,9 @@ void ConnectionEstablisherImpl::OnMessageDispatchResult(bool status) { // When message dispatch result callback is called, it means that the service // worker resolved it's message handler promise and is not holding a // background connection. - PA_LOG(INFO) << "Service worker streaming message dispatch returned status: " - << status; + PA_LOG(VERBOSE) + << "Service worker streaming message dispatch returned status: " + << status; is_connected_ = false; } diff --git a/chrome/browser/chromeos/android_sms/connection_manager.cc b/chrome/browser/chromeos/android_sms/connection_manager.cc index 9ee5d2bfe4694f..321b7ebf401681 100644 --- a/chrome/browser/chromeos/android_sms/connection_manager.cc +++ b/chrome/browser/chromeos/android_sms/connection_manager.cc @@ -92,8 +92,8 @@ void ConnectionManager::UpdateAndroidSmsFeatureState( if (is_android_sms_enabled_ == is_enabled) return; - PA_LOG(INFO) << "ConnectionManager::UpdateAndroidSmsFeatureState enabled: " - << is_enabled; + PA_LOG(VERBOSE) << "ConnectionManager::UpdateAndroidSmsFeatureState enabled: " + << is_enabled; if (is_enabled) { connection_establisher_->EstablishConnection( service_worker_context_, diff --git a/chrome/browser/chromeos/cryptauth/chrome_cryptauth_service.cc b/chrome/browser/chromeos/cryptauth/chrome_cryptauth_service.cc index 0063f6021b3425..227b28a0463fbb 100644 --- a/chrome/browser/chromeos/cryptauth/chrome_cryptauth_service.cc +++ b/chrome/browser/chromeos/cryptauth/chrome_cryptauth_service.cc @@ -130,8 +130,8 @@ ChromeCryptAuthService::ChromeCryptAuthService( weak_ptr_factory_.GetWeakPtr())); if (!identity_manager_->HasPrimaryAccountWithRefreshToken()) { - PA_LOG(INFO) << "Primary account with refresh token not yet available; " - << "waiting before starting CryptAuth managers."; + PA_LOG(VERBOSE) << "Primary account with refresh token not yet available; " + << "waiting before starting CryptAuth managers."; identity_manager_->AddObserver(this); return; } @@ -185,8 +185,8 @@ void ChromeCryptAuthService::OnEnrollmentFinished(bool success) { void ChromeCryptAuthService::OnAuthenticationStateChanged() { if (!identity_manager_->HasPrimaryAccountWithRefreshToken()) { - PA_LOG(INFO) << "Primary account with refresh token not yet available; " - << "waiting before starting CryptAuth managers."; + PA_LOG(VERBOSE) << "Primary account with refresh token not yet available; " + << "waiting before starting CryptAuth managers."; return; } @@ -213,7 +213,7 @@ void ChromeCryptAuthService::PerformEnrollmentAndDeviceSyncIfPossible() { // the CryptAuth back-end when the registration would never actually be used. if (!multidevice_setup::AreAnyMultiDeviceFeaturesAllowed( profile_->GetPrefs())) { - PA_LOG(INFO) << "CryptAuth enrollment is disabled by enterprise policy."; + PA_LOG(VERBOSE) << "CryptAuth enrollment is disabled by enterprise policy."; return; } diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_challenge_wrapper.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_challenge_wrapper.cc index abbc6005d4bf3d..9a4e61f7b71fa7 100644 --- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_challenge_wrapper.cc +++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_challenge_wrapper.cc @@ -77,7 +77,7 @@ void EasyUnlockChallengeWrapper::OnChannelBindingDataSigned( wrapped_challenge.set_header_and_body(challenge_); wrapped_challenge.set_signature(signature_container.SerializeAsString()); - PA_LOG(INFO) << "Finished wrapping challenge."; + PA_LOG(VERBOSE) << "Finished wrapping challenge."; callback_.Run(wrapped_challenge.SerializeAsString()); } diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.cc index 43bd9838dc152d..d68283c4e1e94a 100644 --- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.cc +++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.cc @@ -376,7 +376,7 @@ void EasyUnlockService::AttemptAuth(const AccountId& account_id) { GetType() == TYPE_REGULAR ? EasyUnlockAuthAttempt::TYPE_UNLOCK : EasyUnlockAuthAttempt::TYPE_SIGNIN; if (auth_attempt_) { - PA_LOG(INFO) << "Already attempting auth, skipping this request."; + PA_LOG(VERBOSE) << "Already attempting auth, skipping this request."; return; } @@ -646,7 +646,7 @@ void EasyUnlockService::SetProximityAuthDevices( } if (!proximity_auth_system_) { - PA_LOG(INFO) << "Creating ProximityAuthSystem."; + PA_LOG(VERBOSE) << "Creating ProximityAuthSystem."; proximity_auth_system_.reset(new proximity_auth::ProximityAuthSystem( GetType() == TYPE_SIGNIN ? proximity_auth::ProximityAuthSystem::SIGN_IN diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc index 1c40b403b2056b..b1f36e82fcebf2 100644 --- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc +++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc @@ -149,8 +149,8 @@ void EasyUnlockServiceRegular::LoadRemoteDevices() { !device_sync_client_->is_ready()) { // OnEnrollmentFinished() or OnNewDevicesSynced() will call back on this // method once |device_sync_client_| is ready. - PA_LOG(INFO) << "DeviceSyncClient is not ready yet, delaying " - "UseLoadedRemoteDevices()."; + PA_LOG(VERBOSE) << "DeviceSyncClient is not ready yet, delaying " + "UseLoadedRemoteDevices()."; return; } @@ -169,7 +169,7 @@ void EasyUnlockServiceRegular::LoadRemoteDevices() { !is_in_valid_legacy_host_state) { // OnFeatureStatesChanged() will call back on this method when feature state // changes. - PA_LOG(INFO) << "Smart Lock is disabled; aborting."; + PA_LOG(VERBOSE) << "Smart Lock is disabled; aborting."; SetProximityAuthDevices(GetAccountId(), cryptauth::RemoteDeviceRefList(), base::nullopt /* local_device */); return; @@ -209,7 +209,7 @@ void EasyUnlockServiceRegular::LoadRemoteDevices() { // 1. New devices were synced on the lock screen. // 2. The service was initialized while the login screen is still up. if (proximity_auth::ScreenlockBridge::Get()->IsLocked()) { - PA_LOG(INFO) << "Deferring device load until screen is unlocked."; + PA_LOG(VERBOSE) << "Deferring device load until screen is unlocked."; deferring_device_load_ = true; return; } @@ -391,7 +391,7 @@ void EasyUnlockServiceRegular::SetRemoteDevices( std::string remote_devices_json; JSONStringValueSerializer serializer(&remote_devices_json); serializer.Serialize(devices); - PA_LOG(INFO) << "Setting RemoteDevices:\n " << remote_devices_json; + PA_LOG(VERBOSE) << "Setting RemoteDevices:\n " << remote_devices_json; DictionaryPrefUpdate pairing_update(profile()->GetPrefs(), prefs::kEasyUnlockPairing); @@ -733,7 +733,7 @@ void EasyUnlockServiceRegular::OnScreenDidUnlock( // user is signing in we need to load the remotes. Otherwise, the // first time the user locks the screen the feature won't work. if (deferring_device_load_) { - PA_LOG(INFO) << "Loading deferred devices after screen unlock."; + PA_LOG(VERBOSE) << "Loading deferred devices after screen unlock."; deferring_device_load_ = false; LoadRemoteDevices(); } diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.cc index 0c272758a5f10f..44f29a9c4956a7 100644 --- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.cc +++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_signin_chromeos.cc @@ -157,7 +157,7 @@ std::vector DeserializeBeaconSeeds( beacon_seeds.push_back(beacon_seed); } - PA_LOG(INFO) << "Deserialized " << beacon_seeds.size() << " BeaconSeeds."; + PA_LOG(VERBOSE) << "Deserialized " << beacon_seeds.size() << " BeaconSeeds."; return beacon_seeds; } @@ -198,8 +198,8 @@ void EasyUnlockServiceSignin::WrapChallengeForUserAndDevice( &device_public_key_base64); for (const auto& device_data : it->second->devices) { if (device_data.public_key == device_public_key_base64) { - PA_LOG(INFO) << "Wrapping challenge for " << account_id.Serialize() - << "..."; + PA_LOG(VERBOSE) << "Wrapping challenge for " << account_id.Serialize() + << "..."; challenge_wrapper_.reset(new EasyUnlockChallengeWrapper( device_data.challenge, channel_binding_data, account_id, EasyUnlockTpmKeyManagerFactory::GetInstance()->Get(profile()))); @@ -409,7 +409,7 @@ void EasyUnlockServiceSignin::OnFocusedUserChanged( EasyUnlockScreenlockStateHandler::HardlockState hardlock_state; if (GetPersistedHardlockState(&hardlock_state) && hardlock_state != EasyUnlockScreenlockStateHandler::NO_HARDLOCK) { - PA_LOG(INFO) << "Hardlock present, skipping remaining login flow."; + PA_LOG(VERBOSE) << "Hardlock present, skipping remaining login flow."; return; } @@ -503,8 +503,8 @@ void EasyUnlockServiceSignin::OnUserDataLoaded( std::vector beacon_seeds; if (!device.serialized_beacon_seeds.empty()) { - PA_LOG(INFO) << "Deserializing BeaconSeeds: " - << device.serialized_beacon_seeds; + PA_LOG(VERBOSE) << "Deserializing BeaconSeeds: " + << device.serialized_beacon_seeds; beacon_seeds = DeserializeBeaconSeeds(device.serialized_beacon_seeds); } else { PA_LOG(WARNING) << "No BeaconSeeds were loaded."; @@ -516,11 +516,11 @@ void EasyUnlockServiceSignin::OnUserDataLoaded( 0L /* last_update_time_millis */, software_features, beacon_seeds); remote_devices.push_back(remote_device); - PA_LOG(INFO) << "Loaded Remote Device:\n" - << " user id: " << remote_device.user_id << "\n" - << " device id: " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - remote_device.GetDeviceId()); + PA_LOG(VERBOSE) << "Loaded Remote Device:\n" + << " user id: " << remote_device.user_id << "\n" + << " device id: " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + remote_device.GetDeviceId()); } // If |chromeos::features::kMultiDeviceApi| is enabled, both a remote device diff --git a/chrome/browser/chromeos/multidevice_setup/android_sms_app_helper_delegate_impl.cc b/chrome/browser/chromeos/multidevice_setup/android_sms_app_helper_delegate_impl.cc index 466b97c61f4d7b..9f9c94e158ae81 100644 --- a/chrome/browser/chromeos/multidevice_setup/android_sms_app_helper_delegate_impl.cc +++ b/chrome/browser/chromeos/multidevice_setup/android_sms_app_helper_delegate_impl.cc @@ -71,7 +71,7 @@ void AndroidSmsAppHelperDelegateImpl::InstallAndLaunchAndroidSmsApp() { extensions::util::GetInstalledPwaForUrl( profile_, chromeos::android_sms::GetAndroidMessagesURL()); if (!android_sms_pwa) { - PA_LOG(INFO) << "No Messages app found. Installing it."; + PA_LOG(VERBOSE) << "No Messages app found. Installing it."; InstallAndroidSmsApp(true /* launch_on_install */); return; } @@ -85,7 +85,7 @@ void AndroidSmsAppHelperDelegateImpl::LaunchAndroidSmsApp() { profile_, chromeos::android_sms::GetAndroidMessagesURL()); DCHECK(android_sms_pwa); - PA_LOG(INFO) << "Messages app Launching..."; + PA_LOG(VERBOSE) << "Messages app Launching..."; AppLaunchParams params( profile_, android_sms_pwa, extensions::LAUNCH_CONTAINER_WINDOW, WindowOpenDisposition::NEW_WINDOW, extensions::SOURCE_CHROME_INTERNAL); @@ -106,7 +106,7 @@ void AndroidSmsAppHelperDelegateImpl::OnAppInstalled( content_settings::ResourceIdentifier(), std::make_unique(ContentSetting::CONTENT_SETTING_ALLOW)); - PA_LOG(INFO) << "Messages app installed! URL: " << app_url; + PA_LOG(VERBOSE) << "Messages app installed! URL: " << app_url; if (launch_on_install) LaunchAndroidSmsApp(); } else { diff --git a/chrome/browser/chromeos/multidevice_setup/android_sms_pairing_state_tracker_impl.cc b/chrome/browser/chromeos/multidevice_setup/android_sms_pairing_state_tracker_impl.cc index 23333ece43e5cf..1b5e5d10fcdff0 100644 --- a/chrome/browser/chromeos/multidevice_setup/android_sms_pairing_state_tracker_impl.cc +++ b/chrome/browser/chromeos/multidevice_setup/android_sms_pairing_state_tracker_impl.cc @@ -58,7 +58,7 @@ void AndroidSmsPairingStateTrackerImpl::OnCookiesRetrieved( bool was_previously_paired = was_paired_on_last_update_; for (const auto& cookie : cookies) { if (cookie.Name() == kMessagesPairStateCookieName) { - PA_LOG(INFO) << "Cookie says Messages paired: " << cookie.Value(); + PA_LOG(VERBOSE) << "Cookie says Messages paired: " << cookie.Value(); was_paired_on_last_update_ = cookie.Value() == kPairedCookieValue; if (was_previously_paired != was_paired_on_last_update_) NotifyPairingStateChanged(); diff --git a/chrome/browser/chromeos/tether/tether_service.cc b/chrome/browser/chromeos/tether/tether_service.cc index 8251a0a5f27209..77bab8b148b08b 100644 --- a/chrome/browser/chromeos/tether/tether_service.cc +++ b/chrome/browser/chromeos/tether/tether_service.cc @@ -185,8 +185,9 @@ TetherService::TetherService( UMA_HISTOGRAM_BOOLEAN("InstantTethering.UserPreference.OnStartup", IsEnabledByPreference()); - PA_LOG(INFO) << "TetherService has started. Initial user preference value: " - << IsEnabledByPreference(); + PA_LOG(VERBOSE) + << "TetherService has started. Initial user preference value: " + << IsEnabledByPreference(); if (base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi)) { if (device_sync_client_->is_ready()) @@ -217,7 +218,7 @@ void TetherService::StartTetherIfPossible() { if (tether_component_) return; - PA_LOG(INFO) << "Starting up TetherComponent."; + PA_LOG(VERBOSE) << "Starting up TetherComponent."; tether_component_ = chromeos::tether::TetherComponentImpl::Factory::NewInstance( cryptauth_service_, device_sync_client_, secure_channel_client_, @@ -243,7 +244,7 @@ void TetherService::StopTetherIfNecessary() { return; } - PA_LOG(INFO) << "Shutting down TetherComponent."; + PA_LOG(VERBOSE) << "Shutting down TetherComponent."; chromeos::tether::TetherComponent::ShutdownReason shutdown_reason; switch (GetTetherFeatureState()) { @@ -430,7 +431,7 @@ void TetherService::OnShutdownComplete() { chromeos::tether::TetherComponent::Status::SHUT_DOWN); tether_component_->RemoveObserver(this); tether_component_.reset(); - PA_LOG(INFO) << "TetherComponent was shut down."; + PA_LOG(VERBOSE) << "TetherComponent was shut down."; // It is possible that the Tether TechnologyState was set to ENABLED while the // previous TetherComponent instance was shutting down. If that was the case, @@ -820,8 +821,8 @@ bool TetherService::HandleFeatureStateMetricIfUninitialized() { void TetherService::LogUserPreferenceChanged(bool is_now_enabled) { UMA_HISTOGRAM_BOOLEAN("InstantTethering.UserPreference.OnToggle", is_now_enabled); - PA_LOG(INFO) << "Tether user preference changed. New value: " - << is_now_enabled; + PA_LOG(VERBOSE) << "Tether user preference changed. New value: " + << is_now_enabled; } void TetherService::SetTestDoubles( diff --git a/chrome/browser/ui/ash/network/tether_notification_presenter.cc b/chrome/browser/ui/ash/network/tether_notification_presenter.cc index 0134863a263d1a..7153fcf5db6d3d 100644 --- a/chrome/browser/ui/ash/network/tether_notification_presenter.cc +++ b/chrome/browser/ui/ash/network/tether_notification_presenter.cc @@ -125,9 +125,9 @@ TetherNotificationPresenter::~TetherNotificationPresenter() = default; void TetherNotificationPresenter::NotifyPotentialHotspotNearby( cryptauth::RemoteDeviceRef remote_device, int signal_strength) { - PA_LOG(INFO) << "Displaying \"potential hotspot nearby\" notification for " - << "device with name \"" << remote_device.name() << "\". " - << "Notification ID = " << kPotentialHotspotNotificationId; + PA_LOG(VERBOSE) << "Displaying \"potential hotspot nearby\" notification for " + << "device with name \"" << remote_device.name() << "\". " + << "Notification ID = " << kPotentialHotspotNotificationId; hotspot_nearby_device_id_ = std::make_unique(remote_device.GetDeviceId()); @@ -148,9 +148,9 @@ void TetherNotificationPresenter::NotifyPotentialHotspotNearby( } void TetherNotificationPresenter::NotifyMultiplePotentialHotspotsNearby() { - PA_LOG(INFO) << "Displaying \"potential hotspot nearby\" notification for " - << "multiple devices. Notification ID = " - << kPotentialHotspotNotificationId; + PA_LOG(VERBOSE) << "Displaying \"potential hotspot nearby\" notification for " + << "multiple devices. Notification ID = " + << kPotentialHotspotNotificationId; hotspot_nearby_device_id_.reset(); @@ -185,8 +185,8 @@ void TetherNotificationPresenter::RemovePotentialHotspotNotification() { void TetherNotificationPresenter::NotifySetupRequired( const std::string& device_name, int signal_strength) { - PA_LOG(INFO) << "Displaying \"setup required\" notification. Notification " - << "ID = " << kSetupRequiredNotificationId; + PA_LOG(VERBOSE) << "Displaying \"setup required\" notification. Notification " + << "ID = " << kSetupRequiredNotificationId; ShowNotification(CreateNotification( kSetupRequiredNotificationId, @@ -204,8 +204,8 @@ void TetherNotificationPresenter::RemoveSetupRequiredNotification() { void TetherNotificationPresenter::NotifyConnectionToHostFailed() { const std::string id = kActiveHostNotificationId; - PA_LOG(INFO) << "Displaying \"connection attempt failed\" notification. " - << "Notification ID = " << id; + PA_LOG(VERBOSE) << "Displaying \"connection attempt failed\" notification. " + << "Notification ID = " << id; ShowNotification(message_center::Notification::CreateSystemNotification( message_center::NotificationType::NOTIFICATION_TYPE_SIMPLE, id, @@ -240,8 +240,8 @@ void TetherNotificationPresenter::OnNotificationClicked( "InstantTethering.NotificationInteractionType", TetherNotificationPresenter::NOTIFICATION_BUTTON_TAPPED_HOST_NEARBY, TetherNotificationPresenter::NOTIFICATION_INTERACTION_TYPE_MAX); - PA_LOG(INFO) << "\"Potential hotspot nearby\" notification button was " - << "clicked."; + PA_LOG(VERBOSE) << "\"Potential hotspot nearby\" notification button was " + << "clicked."; network_connect_->ConnectToNetworkId(*hotspot_nearby_device_id_); RemoveNotificationIfVisible(kPotentialHotspotNotificationId); return; @@ -326,8 +326,9 @@ void TetherNotificationPresenter::ShowNotification( void TetherNotificationPresenter::OpenSettingsAndRemoveNotification( const std::string& settings_subpage, const std::string& notification_id) { - PA_LOG(INFO) << "Notification with ID " << notification_id << " was clicked. " - << "Opening settings subpage: " << settings_subpage; + PA_LOG(VERBOSE) << "Notification with ID " << notification_id + << " was clicked. " + << "Opening settings subpage: " << settings_subpage; settings_ui_delegate_->ShowSettingsSubPageForProfile(profile_, settings_subpage); diff --git a/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc b/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc index 3ef57bc05a340a..185dc5e3acd383 100644 --- a/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc +++ b/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc @@ -137,8 +137,8 @@ void MultideviceHandler::UpdatePageContent() { std::unique_ptr page_content_dictionary = GeneratePageContentDataDictionary(); DCHECK(page_content_dictionary); - PA_LOG(INFO) << "Updating MultiDevice settings page content with: " - << *page_content_dictionary << "."; + PA_LOG(VERBOSE) << "Updating MultiDevice settings page content with: " + << *page_content_dictionary << "."; FireWebUIListener("settings.updateMultidevicePageContentData", *page_content_dictionary); } @@ -166,8 +166,8 @@ void MultideviceHandler::HandleGetPageContent(const base::ListValue* args) { std::unique_ptr page_content_dictionary = GeneratePageContentDataDictionary(); DCHECK(page_content_dictionary); - PA_LOG(INFO) << "Responding to getPageContentData() request with: " - << *page_content_dictionary << "."; + PA_LOG(VERBOSE) << "Responding to getPageContentData() request with: " + << *page_content_dictionary << "."; ResolveJavascriptCallback(base::Value(callback_id), *page_content_dictionary); } @@ -213,7 +213,6 @@ void MultideviceHandler::HandleRetryPendingHostSetup( } void MultideviceHandler::HandleSetUpAndroidSms(const base::ListValue* args) { - PA_LOG(INFO) << "SetUpSMS triggered."; DCHECK(args->empty()); android_sms_app_helper_->InstallAndLaunchAndroidSmsApp(); } diff --git a/chromeos/components/proximity_auth/bluetooth_low_energy_connection_finder.cc b/chromeos/components/proximity_auth/bluetooth_low_energy_connection_finder.cc index c825582b199ddf..971bb49f68a33a 100644 --- a/chromeos/components/proximity_auth/bluetooth_low_energy_connection_finder.cc +++ b/chromeos/components/proximity_auth/bluetooth_low_energy_connection_finder.cc @@ -76,7 +76,7 @@ void BluetoothLowEnergyConnectionFinder::Find( PA_LOG(WARNING) << "Bluetooth is unsupported on this platform. Aborting."; return; } - PA_LOG(INFO) << "Finding connection"; + PA_LOG(VERBOSE) << "Finding connection"; connection_callback_ = connection_callback; @@ -91,7 +91,7 @@ void BluetoothLowEnergyConnectionFinder::AdapterPoweredChanged( BluetoothAdapter* adapter, bool powered) { DCHECK_EQ(adapter_.get(), adapter); - PA_LOG(INFO) << "Adapter powered: " << powered; + PA_LOG(VERBOSE) << "Adapter powered: " << powered; // Important: do not rely on |adapter->IsDiscoverying()| to verify if there is // an active discovery session. We need to create our own with an specific @@ -138,7 +138,7 @@ void BluetoothLowEnergyConnectionFinder::HandleDeviceUpdated( return; if (IsRightDevice(device)) { - PA_LOG(INFO) << "Connecting to device " << device->GetAddress(); + PA_LOG(VERBOSE) << "Connecting to device " << device->GetAddress(); connection_ = CreateConnection(device); connection_->AddObserver(this); connection_->Connect(); @@ -163,7 +163,7 @@ bool BluetoothLowEnergyConnectionFinder::IsRightDevice( eid_generator_->GenerateNearestEids(remote_device_.beacon_seeds()); for (const cryptauth::DataWithTimestamp& eid : nearest_eids) { if (eid.data == service_data_string) { - PA_LOG(INFO) << "Found a matching EID: " << eid.DataInHex(); + PA_LOG(VERBOSE) << "Found a matching EID: " << eid.DataInHex(); return true; } } @@ -172,7 +172,7 @@ bool BluetoothLowEnergyConnectionFinder::IsRightDevice( void BluetoothLowEnergyConnectionFinder::OnAdapterInitialized( scoped_refptr adapter) { - PA_LOG(INFO) << "Adapter ready"; + PA_LOG(VERBOSE) << "Adapter ready"; adapter_ = adapter; adapter_->AddObserver(this); StartDiscoverySession(); @@ -180,7 +180,7 @@ void BluetoothLowEnergyConnectionFinder::OnAdapterInitialized( void BluetoothLowEnergyConnectionFinder::OnDiscoverySessionStarted( std::unique_ptr discovery_session) { - PA_LOG(INFO) << "Discovery session started"; + PA_LOG(VERBOSE) << "Discovery session started"; discovery_session_ = std::move(discovery_session); } @@ -198,7 +198,7 @@ void BluetoothLowEnergyConnectionFinder::OnStartDiscoverySessionError() { void BluetoothLowEnergyConnectionFinder::StartDiscoverySession() { DCHECK(adapter_); if (discovery_session_ && discovery_session_->IsActive()) { - PA_LOG(INFO) << "Discovery session already active"; + PA_LOG(VERBOSE) << "Discovery session already active"; return; } @@ -216,7 +216,7 @@ void BluetoothLowEnergyConnectionFinder::StartDiscoverySession() { } void BluetoothLowEnergyConnectionFinder::StopDiscoverySession() { - PA_LOG(INFO) << "Stopping discovery session"; + PA_LOG(VERBOSE) << "Stopping discovery session"; // Destroying the discovery session also stops it. discovery_session_.reset(); } @@ -235,8 +235,8 @@ void BluetoothLowEnergyConnectionFinder::OnConnectionStatusChanged( cryptauth::Connection::Status old_status, cryptauth::Connection::Status new_status) { DCHECK_EQ(connection, connection_.get()); - PA_LOG(INFO) << "OnConnectionStatusChanged: " << old_status << " -> " - << new_status; + PA_LOG(VERBOSE) << "OnConnectionStatusChanged: " << old_status << " -> " + << new_status; if (!connection_callback_.is_null() && connection_->IsConnected()) { adapter_->RemoveObserver(this); @@ -266,7 +266,7 @@ void BluetoothLowEnergyConnectionFinder::OnConnectionStatusChanged( void BluetoothLowEnergyConnectionFinder::RestartDiscoverySessionAsync() { bool discovery_active = discovery_session_ && discovery_session_->IsActive(); if (!connection_ && !discovery_active) { - PA_LOG(INFO) << "Restarting discovery session."; + PA_LOG(VERBOSE) << "Restarting discovery session."; StartDiscoverySession(); } } diff --git a/chromeos/components/proximity_auth/messenger_impl.cc b/chromeos/components/proximity_auth/messenger_impl.cc index 2df8919e39160c..085ac068bbfc4f 100644 --- a/chromeos/components/proximity_auth/messenger_impl.cc +++ b/chromeos/components/proximity_auth/messenger_impl.cc @@ -258,7 +258,7 @@ void MessengerImpl::OnConnectionStatusChanged( DCHECK_EQ(connection, connection_.get()); if (new_status == cryptauth::Connection::Status::DISCONNECTED) { - PA_LOG(INFO) << "Secure channel disconnected..."; + PA_LOG(VERBOSE) << "Secure channel disconnected..."; connection_->RemoveObserver(this); for (auto& observer : observers_) observer.OnDisconnected(); diff --git a/chromeos/components/proximity_auth/proximity_auth_local_state_pref_manager.cc b/chromeos/components/proximity_auth/proximity_auth_local_state_pref_manager.cc index 7cb0f657b765e0..acc85c4a0f9ab3 100644 --- a/chromeos/components/proximity_auth/proximity_auth_local_state_pref_manager.cc +++ b/chromeos/components/proximity_auth/proximity_auth_local_state_pref_manager.cc @@ -119,7 +119,7 @@ bool ProximityAuthLocalStatePrefManager::IsChromeOSLoginAllowed() const { !user_prefs->GetBooleanWithoutPathExpansion( chromeos::multidevice_setup::kSmartLockSigninAllowedPrefName, &pref_value)) { - PA_LOG(INFO) << "Failed to get is_chrome_login_allowed, not disallowing"; + PA_LOG(VERBOSE) << "Failed to get is_chrome_login_allowed, not disallowing"; return true; } return pref_value; diff --git a/chromeos/components/proximity_auth/proximity_monitor_impl.cc b/chromeos/components/proximity_auth/proximity_monitor_impl.cc index 3c6efe3d66fd75..d27512495339ac 100644 --- a/chromeos/components/proximity_auth/proximity_monitor_impl.cc +++ b/chromeos/components/proximity_auth/proximity_monitor_impl.cc @@ -191,7 +191,7 @@ void ProximityMonitorImpl::OnConnectionInfo( void ProximityMonitorImpl::OnGetRssi(const base::Optional& rssi) { if (!is_active_) { - PA_LOG(INFO) << "Received RSSI after stopping."; + PA_LOG(VERBOSE) << "Received RSSI after stopping."; return; } @@ -231,13 +231,13 @@ void ProximityMonitorImpl::CheckForProximityStateChange() { rssi_rolling_average_ && *rssi_rolling_average_ > rssi_threshold_; if (rssi_rolling_average_ && !is_now_in_proximity) { - PA_LOG(INFO) << "Not in proximity. Rolling RSSI average: " - << *rssi_rolling_average_; + PA_LOG(VERBOSE) << "Not in proximity. Rolling RSSI average: " + << *rssi_rolling_average_; } if (remote_device_is_in_proximity_ != is_now_in_proximity) { - PA_LOG(INFO) << "[Proximity] Updated proximity state: " - << (is_now_in_proximity ? "proximate" : "distant"); + PA_LOG(VERBOSE) << "[Proximity] Updated proximity state: " + << (is_now_in_proximity ? "proximate" : "distant"); remote_device_is_in_proximity_ = is_now_in_proximity; for (auto& observer : observers_) observer.OnProximityStateChanged(); diff --git a/chromeos/components/proximity_auth/remote_device_life_cycle_impl.cc b/chromeos/components/proximity_auth/remote_device_life_cycle_impl.cc index 97b932d8b92f89..079fa9738ec526 100644 --- a/chromeos/components/proximity_auth/remote_device_life_cycle_impl.cc +++ b/chromeos/components/proximity_auth/remote_device_life_cycle_impl.cc @@ -50,7 +50,7 @@ RemoteDeviceLifeCycleImpl::RemoteDeviceLifeCycleImpl( RemoteDeviceLifeCycleImpl::~RemoteDeviceLifeCycleImpl() {} void RemoteDeviceLifeCycleImpl::Start() { - PA_LOG(INFO) << "Life cycle for " << remote_device_.name() << " started."; + PA_LOG(VERBOSE) << "Life cycle for " << remote_device_.name() << " started."; DCHECK(state_ == RemoteDeviceLifeCycle::State::STOPPED); FindConnection(); } @@ -110,7 +110,7 @@ RemoteDeviceLifeCycleImpl::CreateAuthenticator() { void RemoteDeviceLifeCycleImpl::TransitionToState( RemoteDeviceLifeCycle::State new_state) { - PA_LOG(INFO) << "Life cycle transition: " << state_ << " => " << new_state; + PA_LOG(VERBOSE) << "Life cycle transition: " << state_ << " => " << new_state; RemoteDeviceLifeCycle::State old_state = state_; state_ = new_state; for (auto& observer : observers_) diff --git a/chromeos/components/proximity_auth/unlock_manager_impl.cc b/chromeos/components/proximity_auth/unlock_manager_impl.cc index 56b94e22ec88a4..02059c0290a669 100644 --- a/chromeos/components/proximity_auth/unlock_manager_impl.cc +++ b/chromeos/components/proximity_auth/unlock_manager_impl.cc @@ -179,11 +179,11 @@ void UnlockManagerImpl::OnUnlockEventSent(bool success) { void UnlockManagerImpl::OnRemoteStatusUpdate( const RemoteStatusUpdate& status_update) { - PA_LOG(INFO) << "Status Update: (" - << "user_present=" << status_update.user_presence << ", " - << "secure_screen_lock=" - << status_update.secure_screen_lock_state << ", " - << "trust_agent=" << status_update.trust_agent_state << ")"; + PA_LOG(VERBOSE) << "Status Update: (" + << "user_present=" << status_update.user_presence << ", " + << "secure_screen_lock=" + << status_update.secure_screen_lock_state << ", " + << "trust_agent=" << status_update.trust_agent_state << ")"; metrics::RecordRemoteSecuritySettingsState( GetRemoteSecuritySettingsState(status_update)); @@ -230,7 +230,7 @@ void UnlockManagerImpl::OnDisconnected() { } void UnlockManagerImpl::OnProximityStateChanged() { - PA_LOG(INFO) << "Proximity state changed."; + PA_LOG(VERBOSE) << "Proximity state changed."; UpdateLockScreen(); } @@ -291,7 +291,7 @@ void UnlockManagerImpl::AttemptToStartRemoteDeviceLifecycle() { void UnlockManagerImpl::OnAuthAttempted(mojom::AuthType auth_type) { if (is_attempting_auth_) { - PA_LOG(INFO) << "Already attempting auth."; + PA_LOG(VERBOSE) << "Already attempting auth."; return; } @@ -325,7 +325,8 @@ void UnlockManagerImpl::OnAuthAttempted(mojom::AuthType auth_type) { if (GetMessenger()->SupportsSignIn()) { GetMessenger()->RequestUnlock(); } else { - PA_LOG(INFO) << "Protocol v3.1 not supported, skipping request_unlock."; + PA_LOG(VERBOSE) + << "Protocol v3.1 not supported, skipping request_unlock."; GetMessenger()->DispatchUnlockEvent(); } } @@ -389,7 +390,7 @@ void UnlockManagerImpl::OnGetConnectionMetadata( } void UnlockManagerImpl::OnGotSignInChallenge(const std::string& challenge) { - PA_LOG(INFO) << "Got sign-in challenge, sending for decryption..."; + PA_LOG(VERBOSE) << "Got sign-in challenge, sending for decryption..."; if (GetMessenger()) GetMessenger()->RequestDecryption(challenge); } @@ -512,11 +513,11 @@ void UnlockManagerImpl::AcceptAuthAttempt(bool should_accept) { is_attempting_auth_ = false; if (screenlock_type_ == ProximityAuthSystem::SIGN_IN) { - PA_LOG(INFO) << "Finalizing sign-in..."; + PA_LOG(VERBOSE) << "Finalizing sign-in..."; proximity_auth_client_->FinalizeSignin( should_accept && sign_in_secret_ ? *sign_in_secret_ : std::string()); } else { - PA_LOG(INFO) << "Finalizing unlock..."; + PA_LOG(VERBOSE) << "Finalizing unlock..."; proximity_auth_client_->FinalizeUnlock(should_accept); } } diff --git a/chromeos/components/proximity_auth/webui/proximity_auth_webui_handler.cc b/chromeos/components/proximity_auth/webui/proximity_auth_webui_handler.cc index de10cb51d977f1..d86e836ed76016 100644 --- a/chromeos/components/proximity_auth/webui/proximity_auth_webui_handler.cc +++ b/chromeos/components/proximity_auth/webui/proximity_auth_webui_handler.cc @@ -348,9 +348,9 @@ void ProximityAuthWebUIHandler::ToggleUnlockKey(const base::ListValue* args) { *(request.mutable_device_classifier()) = proximity_auth_client_->GetDeviceClassifier(); - PA_LOG(INFO) << "Toggling unlock key:\n" - << " public_key: " << public_key_b64 << "\n" - << " make_unlock_key: " << make_unlock_key; + PA_LOG(VERBOSE) << "Toggling unlock key:\n" + << " public_key: " << public_key_b64 << "\n" + << " make_unlock_key: " << make_unlock_key; cryptauth_client_ = cryptauth_client_factory_->CreateInstance(); cryptauth_client_->ToggleEasyUnlock( request, @@ -498,9 +498,9 @@ void ProximityAuthWebUIHandler::OnFoundEligibleUnlockDevices( ineligible_devices.Append(IneligibleDeviceToDictionary(ineligible_device)); } - PA_LOG(INFO) << "Found " << eligible_devices.GetSize() - << " eligible devices and " << ineligible_devices.GetSize() - << " ineligible devices."; + PA_LOG(VERBOSE) << "Found " << eligible_devices.GetSize() + << " eligible devices and " << ineligible_devices.GetSize() + << " ineligible devices."; web_ui()->CallJavascriptFunctionUnsafe( "CryptAuthInterface.onGotEligibleDevices", eligible_devices, ineligible_devices); @@ -626,8 +626,8 @@ void ProximityAuthWebUIHandler::StartRemoteDeviceLifeCycle( void ProximityAuthWebUIHandler::CleanUpRemoteDeviceLifeCycle() { if (selected_remote_device_) { - PA_LOG(INFO) << "Cleaning up connection to " - << selected_remote_device_->name(); + PA_LOG(VERBOSE) << "Cleaning up connection to " + << selected_remote_device_->name(); } life_cycle_.reset(); selected_remote_device_ = base::nullopt; @@ -834,13 +834,13 @@ void ProximityAuthWebUIHandler::OnLifeCycleStateChanged( void ProximityAuthWebUIHandler::OnRemoteStatusUpdate( const RemoteStatusUpdate& status_update) { - PA_LOG(INFO) << "Remote status update:" - << "\n user_presence: " - << static_cast(status_update.user_presence) - << "\n secure_screen_lock_state: " - << static_cast(status_update.secure_screen_lock_state) - << "\n trust_agent_state: " - << static_cast(status_update.trust_agent_state); + PA_LOG(VERBOSE) << "Remote status update:" + << "\n user_presence: " + << static_cast(status_update.user_presence) + << "\n secure_screen_lock_state: " + << static_cast(status_update.secure_screen_lock_state) + << "\n trust_agent_state: " + << static_cast(status_update.trust_agent_state); last_remote_status_update_.reset(new RemoteStatusUpdate(status_update)); std::unique_ptr synced_devices = GetRemoteDevicesList(); @@ -849,11 +849,11 @@ void ProximityAuthWebUIHandler::OnRemoteStatusUpdate( } void ProximityAuthWebUIHandler::OnForceEnrollmentNow(bool success) { - PA_LOG(INFO) << "Force enrollment result: " << success; + PA_LOG(VERBOSE) << "Force enrollment result: " << success; } void ProximityAuthWebUIHandler::OnForceSyncNow(bool success) { - PA_LOG(INFO) << "Force sync result: " << success; + PA_LOG(VERBOSE) << "Force sync result: " << success; } void ProximityAuthWebUIHandler::OnSetSoftwareFeatureState( @@ -864,8 +864,8 @@ void ProximityAuthWebUIHandler::OnSetSoftwareFeatureState( if (result_code == chromeos::device_sync::mojom::NetworkRequestResult::kSuccess) { - PA_LOG(INFO) << "Successfully set SoftwareFeature state for device: " - << device_id; + PA_LOG(VERBOSE) << "Successfully set SoftwareFeature state for device: " + << device_id; } else { PA_LOG(ERROR) << "Failed to set SoftwareFeature state for device: " << device_id << ", error code: " << result_code; @@ -892,10 +892,10 @@ void ProximityAuthWebUIHandler::OnFindEligibleDevices( ineligible_devices_list_value.Append(RemoteDeviceToDictionary(device)); } - PA_LOG(INFO) << "Found " << eligible_devices_list_value.GetSize() - << " eligible devices and " - << ineligible_devices_list_value.GetSize() - << " ineligible devices."; + PA_LOG(VERBOSE) << "Found " << eligible_devices_list_value.GetSize() + << " eligible devices and " + << ineligible_devices_list_value.GetSize() + << " ineligible devices."; web_ui()->CallJavascriptFunctionUnsafe( "CryptAuthInterface.onGotEligibleDevices", eligible_devices_list_value, ineligible_devices_list_value); @@ -946,9 +946,9 @@ void ProximityAuthWebUIHandler::OnGetDebugInfo( void ProximityAuthWebUIHandler::NotifyOnEnrollmentFinished( bool success, std::unique_ptr enrollment_state) { - PA_LOG(INFO) << "Enrollment attempt completed with success=" << success - << ":\n" - << *enrollment_state; + PA_LOG(VERBOSE) << "Enrollment attempt completed with success=" << success + << ":\n" + << *enrollment_state; web_ui()->CallJavascriptFunctionUnsafe( "LocalStateInterface.onEnrollmentStateChanged", *enrollment_state); } @@ -957,16 +957,16 @@ void ProximityAuthWebUIHandler::NotifyOnSyncFinished( bool was_sync_successful, bool changed, std::unique_ptr device_sync_state) { - PA_LOG(INFO) << "Device sync completed with result=" << was_sync_successful - << ":\n" - << *device_sync_state; + PA_LOG(VERBOSE) << "Device sync completed with result=" << was_sync_successful + << ":\n" + << *device_sync_state; web_ui()->CallJavascriptFunctionUnsafe( "LocalStateInterface.onDeviceSyncStateChanged", *device_sync_state); if (changed) { std::unique_ptr synced_devices = GetRemoteDevicesList(); - PA_LOG(INFO) << "New unlock keys obtained after device sync:\n" - << *synced_devices; + PA_LOG(VERBOSE) << "New unlock keys obtained after device sync:\n" + << *synced_devices; web_ui()->CallJavascriptFunctionUnsafe( "LocalStateInterface.onRemoteDevicesChanged", *synced_devices); } @@ -977,12 +977,12 @@ void ProximityAuthWebUIHandler::NotifyGotLocalState( std::unique_ptr enrollment_state, std::unique_ptr device_sync_state, std::unique_ptr synced_devices) { - PA_LOG(INFO) << "==== Got Local State ====\n" - << "Device ID (truncated): " << *truncated_local_device_id - << "\nEnrollment State: \n" - << *enrollment_state << "Device Sync State: \n" - << *device_sync_state << "Synced devices: \n" - << *synced_devices; + PA_LOG(VERBOSE) << "==== Got Local State ====\n" + << "Device ID (truncated): " << *truncated_local_device_id + << "\nEnrollment State: \n" + << *enrollment_state << "Device Sync State: \n" + << *device_sync_state << "Synced devices: \n" + << *synced_devices; web_ui()->CallJavascriptFunctionUnsafe( "LocalStateInterface.onGotLocalState", *truncated_local_device_id, *enrollment_state, *device_sync_state, *synced_devices); diff --git a/chromeos/components/tether/ble_connection_manager.cc b/chromeos/components/tether/ble_connection_manager.cc index cf5dd3ea929ecd..579b564191758c 100644 --- a/chromeos/components/tether/ble_connection_manager.cc +++ b/chromeos/components/tether/ble_connection_manager.cc @@ -213,10 +213,10 @@ void BleConnectionManager::ConnectionMetadata::OnMessageSent( cryptauth::SecureChannel* secure_channel, int sequence_number) { DCHECK(secure_channel_.get() == secure_channel); - PA_LOG(INFO) << "Message sent successfully to device with ID \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - device_id_) - << "\"; message sequence number: " << sequence_number; + PA_LOG(VERBOSE) << "Message sent successfully to device with ID \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id_) + << "\"; message sequence number: " << sequence_number; manager_->NotifyMessageSent(sequence_number); } @@ -248,10 +248,11 @@ void BleConnectionManager::RegisterRemoteDevice( } has_registered_observer_ = true; - PA_LOG(INFO) << "Register - Device ID: \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs(device_id) - << "\", Request ID: " << request_id - << ", Priority: " << connection_priority; + PA_LOG(VERBOSE) << "Register - Device ID: \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id) + << "\", Request ID: " << request_id + << ", Priority: " << connection_priority; ConnectionMetadata* connection_metadata = GetConnectionMetadata(device_id); if (!connection_metadata) @@ -275,9 +276,10 @@ void BleConnectionManager::UnregisterRemoteDevice( return; } - PA_LOG(INFO) << "Unregister - Device ID: \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs(device_id) - << "\", Request ID: " << request_id; + PA_LOG(VERBOSE) << "Unregister - Device ID: \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id) + << "\", Request ID: " << request_id; connection_metadata->UnregisterConnectionRequest(request_id); if (!connection_metadata->HasPendingConnectionRequests()) { @@ -317,9 +319,10 @@ int BleConnectionManager::SendMessage(const std::string& device_id, return -1; } - PA_LOG(INFO) << "SendMessage(): Device ID: \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs(device_id) - << "\", Message: \"" << message << "\""; + PA_LOG(VERBOSE) << "SendMessage(): Device ID: \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id) + << "\", Message: \"" << message << "\""; return connection_metadata->SendMessage(message); } @@ -378,9 +381,9 @@ void BleConnectionManager::OnReceivedAdvertisementFromDevice( return; } - PA_LOG(INFO) << "Received advertisement - Device ID: \"" - << remote_device.GetTruncatedDeviceIdForLogs() - << "\". Starting authentication handshake."; + PA_LOG(VERBOSE) << "Received advertisement - Device ID: \"" + << remote_device.GetTruncatedDeviceIdForLogs() + << "\". Starting authentication handshake."; device_id_to_is_background_advertisement_map_[device_id] = is_background_advertisement; @@ -457,10 +460,10 @@ void BleConnectionManager::UpdateConnectionAttempts() { // it is possible that EndSuccessfulAttempt() will cause that map to be // modified during iteration. for (const auto& device_id_to_stop : device_ids_to_stop) { - PA_LOG(INFO) << "Connection attempt for device ID \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - device_id_to_stop) - << "\" interrupted by higher-priority connection."; + PA_LOG(VERBOSE) << "Connection attempt for device ID \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id_to_stop) + << "\" interrupted by higher-priority connection."; EndUnsuccessfulAttempt( device_id_to_stop, StateChangeDetail::STATE_CHANGE_DETAIL_INTERRUPTED_BY_HIGHER_PRIORITY); @@ -498,9 +501,10 @@ void BleConnectionManager::StartConnectionAttempt( ConnectionMetadata* connection_metadata = GetConnectionMetadata(device_id); DCHECK(connection_metadata); - PA_LOG(INFO) << "Attempting connection - Device ID: \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs(device_id) - << "\""; + PA_LOG(VERBOSE) << "Attempting connection - Device ID: \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id) + << "\""; bool success = ble_scanner_->RegisterScanFilterForDevice(device_id) && ble_advertiser_->StartAdvertisingToDevice(device_id); @@ -545,9 +549,10 @@ void BleConnectionManager::StopConnectionAttemptAndMoveToEndOfQueue( void BleConnectionManager::OnConnectionAttemptTimeout( const std::string& device_id) { - PA_LOG(INFO) << "Connection attempt timeout - Device ID \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs(device_id) - << "\"."; + PA_LOG(VERBOSE) << "Connection attempt timeout - Device ID \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id) + << "\"."; EndUnsuccessfulAttempt( device_id, StateChangeDetail::STATE_CHANGE_DETAIL_COULD_NOT_ATTEMPT_CONNECTION); @@ -589,9 +594,10 @@ void BleConnectionManager::NotifyAdvertisementReceived( void BleConnectionManager::NotifyMessageReceived(std::string device_id, std::string payload) { - PA_LOG(INFO) << "Message received - Device ID: \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs(device_id) - << "\", Message: \"" << payload << "\"."; + PA_LOG(VERBOSE) << "Message received - Device ID: \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id) + << "\", Message: \"" << payload << "\"."; for (auto& observer : observer_list_) observer.OnMessageReceived(device_id, payload); } @@ -601,12 +607,15 @@ void BleConnectionManager::NotifySecureChannelStatusChanged( cryptauth::SecureChannel::Status old_status, cryptauth::SecureChannel::Status new_status, StateChangeDetail state_change_detail) { - PA_LOG(INFO) << "Status change - Device ID: \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs(device_id) - << "\": " << cryptauth::SecureChannel::StatusToString(old_status) - << " => " << cryptauth::SecureChannel::StatusToString(new_status) - << ", State change detail: " - << StateChangeDetailToString(state_change_detail); + PA_LOG(VERBOSE) << "Status change - Device ID: \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id) + << "\": " + << cryptauth::SecureChannel::StatusToString(old_status) + << " => " + << cryptauth::SecureChannel::StatusToString(new_status) + << ", State change detail: " + << StateChangeDetailToString(state_change_detail); for (auto& observer : metrics_observer_list_) { if (old_status == cryptauth::SecureChannel::Status::DISCONNECTED && diff --git a/chromeos/components/tether/ble_scanner_impl.cc b/chromeos/components/tether/ble_scanner_impl.cc index 9017e15b6b05c4..91b3590e68f85d 100644 --- a/chromeos/components/tether/ble_scanner_impl.cc +++ b/chromeos/components/tether/ble_scanner_impl.cc @@ -221,7 +221,7 @@ void BleScannerImpl::EnsureDiscoverySessionActive() { void BleScannerImpl::OnDiscoverySessionStarted( std::unique_ptr discovery_session) { is_initializing_discovery_session_ = false; - PA_LOG(INFO) << "Started discovery session successfully."; + PA_LOG(VERBOSE) << "Started discovery session successfully."; discovery_session_ = std::move(discovery_session); discovery_session_weak_ptr_factory_ = @@ -256,7 +256,7 @@ void BleScannerImpl::EnsureDiscoverySessionNotActive() { void BleScannerImpl::OnDiscoverySessionStopped() { is_stopping_discovery_session_ = false; - PA_LOG(INFO) << "Stopped discovery session successfully."; + PA_LOG(VERBOSE) << "Stopped discovery session successfully."; discovery_session_.reset(); discovery_session_weak_ptr_factory_.reset(); diff --git a/chromeos/components/tether/connect_tethering_operation.cc b/chromeos/components/tether/connect_tethering_operation.cc index 585dc16e8ed15e..ca226973ef6a4f 100644 --- a/chromeos/components/tether/connect_tethering_operation.cc +++ b/chromeos/components/tether/connect_tethering_operation.cc @@ -128,11 +128,11 @@ void ConnectTetheringOperation::OnMessageReceived( ConnectTetheringResponse_ResponseCode:: ConnectTetheringResponse_ResponseCode_SUCCESS) { if (response->has_ssid() && response->has_password()) { - PA_LOG(INFO) << "Received ConnectTetheringResponse from device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << " and " - << "response_code == SUCCESS. Config: {ssid: \"" - << response->ssid() << "\", password: \"" - << response->password() << "\"}"; + PA_LOG(VERBOSE) + << "Received ConnectTetheringResponse from device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() << " and " + << "response_code == SUCCESS. Config: {ssid: \"" << response->ssid() + << "\", password: \"" << response->password() << "\"}"; tether_host_response_recorder_->RecordSuccessfulConnectTetheringResponse( remote_device); @@ -151,9 +151,10 @@ void ConnectTetheringOperation::OnMessageReceived( HostResponseErrorCode::INVALID_HOTSPOT_CREDENTIALS; } } else { - PA_LOG(INFO) << "Received ConnectTetheringResponse from device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << " and " - << "response_code == " << response->response_code() << "."; + PA_LOG(WARNING) + << "Received ConnectTetheringResponse from unexpected device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() << " and " + << "response_code == " << response->response_code() << "."; error_code_to_return_ = ConnectTetheringResponseCodeToHostResponseErrorCode( response->response_code()); } diff --git a/chromeos/components/tether/connection_preserver_impl.cc b/chromeos/components/tether/connection_preserver_impl.cc index a49903e96e4cb3..0942bf785abf33 100644 --- a/chromeos/components/tether/connection_preserver_impl.cc +++ b/chromeos/components/tether/connection_preserver_impl.cc @@ -75,10 +75,10 @@ void ConnectionPreserverImpl::HandleSuccessfulTetherAvailabilityResponse( RemovePreservedConnectionIfPresent(); SetPreservedConnection(device_id); } else { - PA_LOG(INFO) << "The connection to device with ID " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - device_id) - << " was not preserved; another device has higher priority."; + PA_LOG(VERBOSE) + << "The connection to device with ID " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs(device_id) + << " was not preserved; another device has higher priority."; } } @@ -95,9 +95,9 @@ void ConnectionPreserverImpl::OnConnectionAttemptFailure( void ConnectionPreserverImpl::OnConnection( std::unique_ptr channel) { DCHECK(base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi)); - PA_LOG(INFO) << "Successfully preserved connection for device: " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - preserved_connection_device_id_); + PA_LOG(VERBOSE) << "Successfully preserved connection for device: " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + preserved_connection_device_id_); // Simply hold on to the ClientChannel until the connection should no longer // be preserved. @@ -106,9 +106,9 @@ void ConnectionPreserverImpl::OnConnection( void ConnectionPreserverImpl::OnDisconnected() { DCHECK(base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi)); - PA_LOG(INFO) << "Remote device disconnected from this device: " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - preserved_connection_device_id_); + PA_LOG(VERBOSE) << "Remote device disconnected from this device: " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + preserved_connection_device_id_); RemovePreservedConnectionIfPresent(); } @@ -164,9 +164,10 @@ void ConnectionPreserverImpl::SetPreservedConnection( const std::string& device_id) { DCHECK(preserved_connection_device_id_.empty()); - PA_LOG(INFO) << "Preserving connection to device with ID " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs(device_id) - << "."; + PA_LOG(VERBOSE) << "Preserving connection to device with ID " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id) + << "."; preserved_connection_device_id_ = device_id; @@ -201,10 +202,10 @@ void ConnectionPreserverImpl::RemovePreservedConnectionIfPresent() { if (preserved_connection_device_id_.empty()) return; - PA_LOG(INFO) << "Removing preserved connection to device with ID " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - preserved_connection_device_id_) - << "."; + PA_LOG(VERBOSE) << "Removing preserved connection to device with ID " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + preserved_connection_device_id_) + << "."; if (base::FeatureList::IsEnabled(chromeos::features::kMultiDeviceApi)) { connection_attempt_.reset(); diff --git a/chromeos/components/tether/disconnect_tethering_request_sender_impl.cc b/chromeos/components/tether/disconnect_tethering_request_sender_impl.cc index 676995f3ed7974..25b8c372ff1e58 100644 --- a/chromeos/components/tether/disconnect_tethering_request_sender_impl.cc +++ b/chromeos/components/tether/disconnect_tethering_request_sender_impl.cc @@ -97,10 +97,10 @@ void DisconnectTetheringRequestSenderImpl::OnTetherHostFetched( return; } - PA_LOG(INFO) << "Attempting to send DisconnectTetheringRequest to device " - << "with ID " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - device_id); + PA_LOG(VERBOSE) << "Attempting to send DisconnectTetheringRequest to device " + << "with ID " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id); std::unique_ptr disconnect_tethering_operation = DisconnectTetheringOperation::Factory::NewInstance( @@ -120,10 +120,10 @@ void DisconnectTetheringRequestSenderImpl::OnOperationFinished( const std::string& device_id, bool success) { if (success) { - PA_LOG(INFO) << "Successfully sent DisconnectTetheringRequest to device " - << "with ID " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - device_id); + PA_LOG(VERBOSE) << "Successfully sent DisconnectTetheringRequest to device " + << "with ID " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id); } else { PA_LOG(ERROR) << "Failed to send DisconnectTetheringRequest to device " << "with ID " diff --git a/chromeos/components/tether/gms_core_notifications_state_tracker_impl.cc b/chromeos/components/tether/gms_core_notifications_state_tracker_impl.cc index 77b245f5c22da1..ed4e72b57f7296 100644 --- a/chromeos/components/tether/gms_core_notifications_state_tracker_impl.cc +++ b/chromeos/components/tether/gms_core_notifications_state_tracker_impl.cc @@ -117,7 +117,7 @@ void GmsCoreNotificationsStateTrackerImpl::SendDeviceNamesChangeEvent() { ss.seekp(-1, ss.cur); } ss << "]"; - PA_LOG(INFO) << ss.str(); + PA_LOG(VERBOSE) << ss.str(); NotifyGmsCoreNotificationStateChanged(); } diff --git a/chromeos/components/tether/host_scan_scheduler_impl.cc b/chromeos/components/tether/host_scan_scheduler_impl.cc index e790ab63b52d3d..8523d4abbbe272 100644 --- a/chromeos/components/tether/host_scan_scheduler_impl.cc +++ b/chromeos/components/tether/host_scan_scheduler_impl.cc @@ -94,8 +94,8 @@ void HostScanSchedulerImpl::AttemptScanIfOffline() { network_state_handler_->FirstNetworkByType( chromeos::NetworkTypePattern::Default()); if (IsOnlineOrHasActiveTetherConnection(first_network)) { - PA_LOG(INFO) << "Skipping scan attempt because the device is already " - "connected to a network."; + PA_LOG(VERBOSE) << "Skipping scan attempt because the device is already " + "connected to a network."; return; } @@ -180,7 +180,7 @@ void HostScanSchedulerImpl::AttemptScan() { // If the screen is locked, a host scan should not occur. if (session_manager_->IsScreenLocked()) { - PA_LOG(INFO) << "Skipping scan attempt because the screen is locked."; + PA_LOG(VERBOSE) << "Skipping scan attempt because the screen is locked."; return; } @@ -225,8 +225,8 @@ void HostScanSchedulerImpl::LogHostScanBatchMetric() { base::TimeDelta::FromDays(kMaxScanMetricsDays) /* max */, kNumMetricsBuckets /* bucket_count */); - PA_LOG(INFO) << "Logging host scan batch duration. Duration was " - << batch_duration.InSeconds() << " seconds."; + PA_LOG(VERBOSE) << "Logging host scan batch duration. Duration was " + << batch_duration.InSeconds() << " seconds."; } } // namespace tether diff --git a/chromeos/components/tether/host_scanner_impl.cc b/chromeos/components/tether/host_scanner_impl.cc index eed64c1ce83696..6b4f915a0eb16d 100644 --- a/chromeos/components/tether/host_scanner_impl.cc +++ b/chromeos/components/tether/host_scanner_impl.cc @@ -79,7 +79,7 @@ void HostScannerImpl::StopScan() { if (!host_scanner_operation_) return; - PA_LOG(INFO) << "Host scan has been stopped prematurely."; + PA_LOG(VERBOSE) << "Host scan has been stopped prematurely."; host_scanner_operation_->RemoveObserver( gms_core_notifications_state_tracker_); @@ -98,8 +98,8 @@ void HostScannerImpl::OnTetherHostsFetched( return; } - PA_LOG(INFO) << "Starting Tether host scan. " << tether_hosts.size() << " " - << "potential host(s) included in the search."; + PA_LOG(VERBOSE) << "Starting Tether host scan. " << tether_hosts.size() << " " + << "potential host(s) included in the search."; tether_guids_in_cache_before_scan_ = host_scan_cache_->GetTetherGuidsInCache(); @@ -173,8 +173,9 @@ void HostScannerImpl::OnSessionStateChanged() { // notification to be shown once each time the device is unlocked. Without // this change, the notification would only be shown once per user login. // See https://crbug.com/813838. - PA_LOG(INFO) << "Screen was locked; the \"available hosts\" notification can " - << "be shown again after the next unlock."; + PA_LOG(VERBOSE) + << "Screen was locked; the \"available hosts\" notification can " + << "be shown again after the next unlock."; has_notification_been_shown_in_previous_scan_ = false; } @@ -241,8 +242,8 @@ void HostScannerImpl::OnFinalScanResultReceived( was_notification_shown_in_current_scan_ = false; was_notification_showing_when_current_scan_started_ = false; - PA_LOG(INFO) << "Finished Tether host scan. " << final_scan_results.size() - << " potential host(s) were found."; + PA_LOG(VERBOSE) << "Finished Tether host scan. " << final_scan_results.size() + << " potential host(s) were found."; // If the final scan result has been received, the operation is finished. // Delete it. diff --git a/chromeos/components/tether/host_scanner_operation.cc b/chromeos/components/tether/host_scanner_operation.cc index 267923cd789b7b..535bf8d1166bfd 100644 --- a/chromeos/components/tether/host_scanner_operation.cc +++ b/chromeos/components/tether/host_scanner_operation.cc @@ -200,28 +200,31 @@ void HostScannerOperation::OnMessageReceived( static_cast( message_wrapper->GetProto().get()); if (AreGmsCoreNotificationsDisabled(response)) { - PA_LOG(INFO) << "Received TetherAvailabilityResponse from device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << " which " - << "indicates that Google Play Services notifications are " - << "disabled. Response code: " << response->response_code(); + PA_LOG(VERBOSE) + << "Received TetherAvailabilityResponse from device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() << " which " + << "indicates that Google Play Services notifications are " + << "disabled. Response code: " << response->response_code(); gms_core_notifications_disabled_devices_.push_back(remote_device); NotifyObserversOfScannedDeviceList(false /* is_final_scan_result */); } else if (!IsTetheringAvailableWithValidDeviceStatus(response)) { // If the received message is invalid or if it states that tethering is // unavailable, ignore it. - PA_LOG(INFO) << "Received TetherAvailabilityResponse from device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << " which " - << "indicates that tethering is not available."; + PA_LOG(VERBOSE) + << "Received TetherAvailabilityResponse from device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() << " which " + << "indicates that tethering is not available."; } else { bool setup_required = response->response_code() == TetherAvailabilityResponse_ResponseCode:: TetherAvailabilityResponse_ResponseCode_SETUP_NEEDED; - PA_LOG(INFO) << "Received TetherAvailabilityResponse from device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << " which " - << "indicates that tethering is available. setup_required = " - << setup_required; + PA_LOG(VERBOSE) + << "Received TetherAvailabilityResponse from device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() << " which " + << "indicates that tethering is available. setup_required = " + << setup_required; tether_host_response_recorder_->RecordSuccessfulTetherAvailabilityResponse( remote_device); diff --git a/chromeos/components/tether/hotspot_usage_duration_tracker.cc b/chromeos/components/tether/hotspot_usage_duration_tracker.cc index 3e928670d34dd9..456365e22a746d 100644 --- a/chromeos/components/tether/hotspot_usage_duration_tracker.cc +++ b/chromeos/components/tether/hotspot_usage_duration_tracker.cc @@ -58,8 +58,8 @@ void HotspotUsageDurationTracker::OnActiveHostChanged( // a connection is established. last_connection_start_ = base::Time(); - PA_LOG(INFO) << "Connection to hotspot has ended. Duration was " - << duration.InSeconds() << " second(s)."; + PA_LOG(VERBOSE) << "Connection to hotspot has ended. Duration was " + << duration.InSeconds() << " second(s)."; UMA_HISTOGRAM_CUSTOM_TIMES( "InstantTethering.HotspotUsageDuration", duration, base::TimeDelta::FromSeconds(kMinDurationSeconds) /* min */, diff --git a/chromeos/components/tether/master_host_scan_cache.cc b/chromeos/components/tether/master_host_scan_cache.cc index f7123d225d0e3e..388ae00f5fc20a 100644 --- a/chromeos/components/tether/master_host_scan_cache.cc +++ b/chromeos/components/tether/master_host_scan_cache.cc @@ -70,10 +70,10 @@ bool MasterHostScanCache::RemoveHostScanResultImpl( if (active_host_->GetTetherNetworkGuid() == tether_network_guid) { DCHECK(ExistsInCache(tether_network_guid)); - PA_LOG(INFO) << "RemoveHostScanResult() called for Tether network with " - << "GUID " << tether_network_guid << ", but the " - << "corresponding device is the active host. Not removing " - << "this scan result from the cache."; + PA_LOG(VERBOSE) << "RemoveHostScanResult() called for Tether network with " + << "GUID " << tether_network_guid << ", but the " + << "corresponding device is the active host. Not removing " + << "this scan result from the cache."; return false; } @@ -95,8 +95,8 @@ bool MasterHostScanCache::RemoveHostScanResultImpl( DCHECK(removed_from_network && removed_from_persistent && removed_from_timer_map); - PA_LOG(INFO) << "Removed cache entry with GUID \"" << tether_network_guid - << "\"."; + PA_LOG(VERBOSE) << "Removed cache entry with GUID \"" << tether_network_guid + << "\"."; // We already DCHECK()ed above that this evaluates to true, but we return the // AND'ed value here because without this, release builds (without DCHECK()) @@ -165,9 +165,10 @@ void MasterHostScanCache::StartTimer(const std::string& tether_network_guid) { DCHECK(found_iter != tether_guid_to_timer_map_.end()); DCHECK(!found_iter->second->IsRunning()); - PA_LOG(INFO) << "Starting host scan cache timer for Tether network with GUID " - << "\"" << tether_network_guid << "\". Will fire in " - << kNumMinutesBeforeCacheEntryExpires << " minutes."; + PA_LOG(VERBOSE) + << "Starting host scan cache timer for Tether network with GUID " + << "\"" << tether_network_guid << "\". Will fire in " + << kNumMinutesBeforeCacheEntryExpires << " minutes."; found_iter->second->Start( FROM_HERE, @@ -193,8 +194,8 @@ void MasterHostScanCache::OnTimerFired(const std::string& tether_network_guid) { return; } - PA_LOG(INFO) << "Timer fired for Tether network GUID " << tether_network_guid - << ". Removing stale scan result."; + PA_LOG(VERBOSE) << "Timer fired for Tether network GUID " + << tether_network_guid << ". Removing stale scan result."; RemoveHostScanResult(tether_network_guid); } diff --git a/chromeos/components/tether/message_transfer_operation.cc b/chromeos/components/tether/message_transfer_operation.cc index 445739f5102ccc..362647b76a44eb 100644 --- a/chromeos/components/tether/message_transfer_operation.cc +++ b/chromeos/components/tether/message_transfer_operation.cc @@ -308,8 +308,8 @@ void MessageTransferOperation::OnConnection( void MessageTransferOperation::OnDisconnected( cryptauth::RemoteDeviceRef remote_device) { - PA_LOG(INFO) << "Remote device disconnected from this device: " - << remote_device.GetTruncatedDeviceIdForLogs(); + PA_LOG(VERBOSE) << "Remote device disconnected from this device: " + << remote_device.GetTruncatedDeviceIdForLogs(); UnregisterDevice(remote_device); } @@ -336,34 +336,34 @@ void MessageTransferOperation::HandleDeviceDisconnection( case BleConnectionManager::StateChangeDetail:: STATE_CHANGE_DETAIL_COULD_NOT_ATTEMPT_CONNECTION: ++attempts_for_device.empty_scan_attempts; - PA_LOG(INFO) << "Connection attempt failed; could not discover the " - << "device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << ". " - << "Number of failures to establish connection: " - << attempts_for_device.empty_scan_attempts; + PA_LOG(VERBOSE) << "Connection attempt failed; could not discover the " + << "device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() << ". " + << "Number of failures to establish connection: " + << attempts_for_device.empty_scan_attempts; if (attempts_for_device.empty_scan_attempts >= kMaxEmptyScansPerDevice) { - PA_LOG(INFO) << "Reached retry limit for failing to discover the " - << "device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << ". " - << "Unregistering device."; + PA_LOG(VERBOSE) << "Reached retry limit for failing to discover the " + << "device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() << ". " + << "Unregistering device."; UnregisterDevice(remote_device); } break; case BleConnectionManager::StateChangeDetail:: STATE_CHANGE_DETAIL_GATT_CONNECTION_WAS_ATTEMPTED: ++attempts_for_device.gatt_connection_attempts; - PA_LOG(INFO) << "Connection attempt failed; GATT connection error for " - << "device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << ". " - << "Number of GATT error: " - << attempts_for_device.gatt_connection_attempts; + PA_LOG(VERBOSE) << "Connection attempt failed; GATT connection error for " + << "device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() << ". " + << "Number of GATT error: " + << attempts_for_device.gatt_connection_attempts; if (attempts_for_device.gatt_connection_attempts >= kMaxGattConnectionAttemptsPerDevice) { - PA_LOG(INFO) << "Reached retry limit for GATT connection errors for " - << "device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << ". " - << "Unregistering device."; + PA_LOG(VERBOSE) << "Reached retry limit for GATT connection errors for " + << "device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() << ". " + << "Unregistering device."; UnregisterDevice(remote_device); } break; @@ -397,9 +397,9 @@ void MessageTransferOperation::StartMessageTimerForDevice( void MessageTransferOperation::StartTimerForDevice( cryptauth::RemoteDeviceRef remote_device, uint32_t timeout_seconds) { - PA_LOG(INFO) << "Starting timer for operation with message type " - << message_type_for_connection_ << " from device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << "."; + PA_LOG(VERBOSE) << "Starting timer for operation with message type " + << message_type_for_connection_ << " from device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() << "."; remote_device_to_timer_map_.emplace(remote_device, timer_factory_->CreateOneShotTimer()); diff --git a/chromeos/components/tether/network_configuration_remover.cc b/chromeos/components/tether/network_configuration_remover.cc index f83d273d36ea12..6f0e6e4cd2798a 100644 --- a/chromeos/components/tether/network_configuration_remover.cc +++ b/chromeos/components/tether/network_configuration_remover.cc @@ -12,8 +12,8 @@ namespace { void RemoveConfigurationSuccessCallback(const std::string& path) { - PA_LOG(INFO) << "Successfully removed Wi-Fi network with path " << path - << "."; + PA_LOG(VERBOSE) << "Successfully removed Wi-Fi network with path " << path + << "."; } void RemoveConfigurationFailureCallback( diff --git a/chromeos/components/tether/network_connection_handler_tether_delegate.cc b/chromeos/components/tether/network_connection_handler_tether_delegate.cc index 181ba342e2aba3..bf30dacecf05ae 100644 --- a/chromeos/components/tether/network_connection_handler_tether_delegate.cc +++ b/chromeos/components/tether/network_connection_handler_tether_delegate.cc @@ -95,10 +95,10 @@ void NetworkConnectionHandlerTetherDelegate::ConnectToNetwork( std::string previous_host_guid = active_host_->GetTetherNetworkGuid(); DCHECK(!previous_host_guid.empty()); - PA_LOG(INFO) << "Connection requested to GUID " << tether_network_guid - << ", but there is already an active connection. " - << "Disconnecting from network with GUID " - << previous_host_guid << "."; + PA_LOG(VERBOSE) << "Connection requested to GUID " << tether_network_guid + << ", but there is already an active connection. " + << "Disconnecting from network with GUID " + << previous_host_guid << "."; DisconnectFromNetwork( previous_host_guid, base::DoNothing(), base::Bind(&OnFailedDisconnectionFromPreviousHost, previous_host_guid)); diff --git a/chromeos/components/tether/network_host_scan_cache.cc b/chromeos/components/tether/network_host_scan_cache.cc index bc2ccd222517ff..ce4fafb0d0887c 100644 --- a/chromeos/components/tether/network_host_scan_cache.cc +++ b/chromeos/components/tether/network_host_scan_cache.cc @@ -35,22 +35,23 @@ void NetworkHostScanCache::SetHostScanResult(const HostScanCacheEntry& entry) { entry.battery_percentage, entry.signal_strength, HasConnectedToHost(entry.tether_network_guid)); - PA_LOG(INFO) << "Added scan result for Tether network with GUID " - << entry.tether_network_guid << ". " - << "Device name: " << entry.device_name << ", " - << "carrier: " << entry.carrier << ", " - << "battery percentage: " << entry.battery_percentage << ", " - << "signal strength: " << entry.signal_strength; + PA_LOG(VERBOSE) << "Added scan result for Tether network with GUID " + << entry.tether_network_guid << ". " + << "Device name: " << entry.device_name << ", " + << "carrier: " << entry.carrier << ", " + << "battery percentage: " << entry.battery_percentage + << ", " + << "signal strength: " << entry.signal_strength; } else { network_state_handler_->UpdateTetherNetworkProperties( entry.tether_network_guid, entry.carrier, entry.battery_percentage, entry.signal_strength); - PA_LOG(INFO) << "Updated scan result for Tether network with GUID " - << entry.tether_network_guid << ". " - << "New carrier: " << entry.carrier << ", " - << "new battery percentage: " << entry.battery_percentage - << ", new signal strength: " << entry.signal_strength; + PA_LOG(VERBOSE) << "Updated scan result for Tether network with GUID " + << entry.tether_network_guid << ". " + << "New carrier: " << entry.carrier << ", " + << "new battery percentage: " << entry.battery_percentage + << ", new signal strength: " << entry.signal_strength; } } @@ -103,9 +104,9 @@ void NetworkHostScanCache::OnPreviouslyConnectedHostIdsChanged() { tether_network_guid); if (update_successful) { - PA_LOG(INFO) << "Successfully set the HasConnectedToHost property of " - << "the Tether network with GUID " << tether_network_guid - << " to true."; + PA_LOG(VERBOSE) << "Successfully set the HasConnectedToHost property of " + << "the Tether network with GUID " << tether_network_guid + << " to true."; } } } diff --git a/chromeos/components/tether/tether_component_impl.cc b/chromeos/components/tether/tether_component_impl.cc index eab378f8cc72f8..1357d64e3c2e6d 100644 --- a/chromeos/components/tether/tether_component_impl.cc +++ b/chromeos/components/tether/tether_component_impl.cc @@ -231,11 +231,11 @@ void TetherComponentImpl::InitiateShutdown() { // Tether component is shut down. if (active_host->GetActiveHostStatus() != ActiveHost::ActiveHostStatus::DISCONNECTED) { - PA_LOG(INFO) << "There was an active connection during Tether shutdown. " - << "Initiating disconnection from device ID \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - active_host->GetActiveHostDeviceId()) - << "\"."; + PA_LOG(VERBOSE) << "There was an active connection during Tether shutdown. " + << "Initiating disconnection from device ID \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + active_host->GetActiveHostDeviceId()) + << "\"."; tether_disconnector->DisconnectFromNetwork( active_host->GetTetherNetworkGuid(), base::DoNothing(), base::Bind(&OnDisconnectErrorDuringShutdown), diff --git a/chromeos/components/tether/tether_connector_impl.cc b/chromeos/components/tether/tether_connector_impl.cc index ef5f583ce729dd..d2aa349a426831 100644 --- a/chromeos/components/tether/tether_connector_impl.cc +++ b/chromeos/components/tether/tether_connector_impl.cc @@ -81,8 +81,8 @@ void TetherConnectorImpl::ConnectToNetwork( DCHECK(!success_callback.is_null()); DCHECK(!error_callback.is_null()); - PA_LOG(INFO) << "Attempting to connect to network with GUID " - << tether_network_guid << "."; + PA_LOG(VERBOSE) << "Attempting to connect to network with GUID " + << tether_network_guid << "."; notification_presenter_->RemoveConnectionToHostFailedNotification(); const std::string device_id = @@ -97,9 +97,9 @@ void TetherConnectorImpl::ConnectToNetwork( DCHECK(device_id_pending_connection_ != device_id); if (!device_id_pending_connection_.empty()) { - PA_LOG(INFO) << "A connection attempt was already in progress to device " - << "with ID " << device_id_pending_connection_ << ". " - << "Canceling that connection attempt before continuing."; + PA_LOG(VERBOSE) << "A connection attempt was already in progress to device " + << "with ID " << device_id_pending_connection_ << ". " + << "Canceling that connection attempt before continuing."; CancelConnectionAttempt( device_id_tether_network_guid_map_->GetTetherNetworkGuidForDeviceId( device_id_pending_connection_)); @@ -130,8 +130,8 @@ bool TetherConnectorImpl::CancelConnectionAttempt( return false; } - PA_LOG(INFO) << "Canceling connection attempt to Tether network with GUID " - << tether_network_guid; + PA_LOG(VERBOSE) << "Canceling connection attempt to Tether network with GUID " + << tether_network_guid; if (connect_tethering_operation_) { // If a ConnectTetheringOperation is in progress, stop it. @@ -178,17 +178,18 @@ void TetherConnectorImpl::OnSuccessfulConnectTetheringResponse( if (device_id_pending_connection_ != remote_device.GetDeviceId()) { // If the success was part of a previous attempt for a different device, // ignore it. - PA_LOG(INFO) << "Received successful ConnectTetheringResponse from " - << "device with ID " - << remote_device.GetTruncatedDeviceIdForLogs() << ", but the " - << "connection attempt to that device has been canceled."; + PA_LOG(VERBOSE) << "Received successful ConnectTetheringResponse from " + << "device with ID " + << remote_device.GetTruncatedDeviceIdForLogs() + << ", but the " + << "connection attempt to that device has been canceled."; return; } - PA_LOG(INFO) << "Received successful ConnectTetheringResponse from device " - << "with ID " << remote_device.GetTruncatedDeviceIdForLogs() - << ". SSID: \"" << ssid << "\"."; + PA_LOG(VERBOSE) << "Received successful ConnectTetheringResponse from device " + << "with ID " << remote_device.GetTruncatedDeviceIdForLogs() + << ". SSID: \"" << ssid << "\"."; // Make a copy of the device ID, SSID, and password to pass below before // destroying |connect_tethering_operation_|. @@ -212,9 +213,10 @@ void TetherConnectorImpl::OnConnectTetheringFailure( if (device_id_pending_connection_ != device_id_copy) { // If the failure was part of a previous attempt for a different device, // ignore it. - PA_LOG(INFO) << "Received failed ConnectTetheringResponse from device with " - << "ID " << remote_device.GetTruncatedDeviceIdForLogs() - << ", but a connection to another device has already started."; + PA_LOG(VERBOSE) + << "Received failed ConnectTetheringResponse from device with " + << "ID " << remote_device.GetTruncatedDeviceIdForLogs() + << ", but a connection to another device has already started."; return; } @@ -233,10 +235,10 @@ void TetherConnectorImpl::OnTetherHostToConnectFetched( const std::string& device_id, base::Optional tether_host_to_connect) { if (device_id_pending_connection_ != device_id) { - PA_LOG(INFO) << "Device to connect to has changed while device with ID " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - device_id) - << " was being fetched."; + PA_LOG(VERBOSE) << "Device to connect to has changed while device with ID " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id) + << " was being fetched."; return; } @@ -340,11 +342,11 @@ void TetherConnectorImpl::OnWifiConnection( return; } - PA_LOG(INFO) << "Connected to Wi-Fi hotspot for device with ID " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - device_id) - << ", but the connection to that device was canceled. " - << "Disconnecting."; + PA_LOG(VERBOSE) << "Connected to Wi-Fi hotspot for device with ID " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + device_id) + << ", but the connection to that device was canceled. " + << "Disconnecting."; // Disconnect from the Wi-Fi hotspot; otherwise, it is possible to be // connected to the Wi-Fi hotspot despite there being no active host. See diff --git a/chromeos/components/tether/tether_disconnector_impl.cc b/chromeos/components/tether/tether_disconnector_impl.cc index 80430e2a80cd5f..816aeb1581e7e4 100644 --- a/chromeos/components/tether/tether_disconnector_impl.cc +++ b/chromeos/components/tether/tether_disconnector_impl.cc @@ -68,9 +68,10 @@ void TetherDisconnectorImpl::DisconnectFromNetwork( if (status == ActiveHost::ActiveHostStatus::CONNECTING) { // Note: CancelConnectionAttempt() disconnects the active host. if (tether_connector_->CancelConnectionAttempt(tether_network_guid)) { - PA_LOG(INFO) << "Disconnect requested for Tether network with GUID " - << tether_network_guid << ", which had not yet connected. " - << "Canceled in-progress connection attempt."; + PA_LOG(VERBOSE) << "Disconnect requested for Tether network with GUID " + << tether_network_guid + << ", which had not yet connected. " + << "Canceled in-progress connection attempt."; success_callback.Run(); return; } diff --git a/chromeos/components/tether/tether_network_disconnection_handler.cc b/chromeos/components/tether/tether_network_disconnection_handler.cc index e50d7b718a3501..910b82fd548cc7 100644 --- a/chromeos/components/tether/tether_network_disconnection_handler.cc +++ b/chromeos/components/tether/tether_network_disconnection_handler.cc @@ -67,8 +67,8 @@ void TetherNetworkDisconnectionHandler::NetworkConnectionStateChanged( void TetherNetworkDisconnectionHandler::HandleActiveWifiNetworkDisconnection( const std::string& network_guid, const std::string& network_path) { - PA_LOG(INFO) << "Connection to active host (Wi-Fi network GUID " - << network_guid << ") has been lost."; + PA_LOG(VERBOSE) << "Connection to active host (Wi-Fi network GUID " + << network_guid << ") has been lost."; // Check if Wi-Fi is enabled; if it is, this indicates that the connection // to the Tether host dropped. If it isn't, then the event of Wi-Fi being diff --git a/chromeos/components/tether/wifi_hotspot_connector.cc b/chromeos/components/tether/wifi_hotspot_connector.cc index 92d4a0e1e53be2..d730ae5da80c72 100644 --- a/chromeos/components/tether/wifi_hotspot_connector.cc +++ b/chromeos/components/tether/wifi_hotspot_connector.cc @@ -65,13 +65,13 @@ void WifiHotspotConnector::ConnectToWifiHotspot( network_state_handler_->DisassociateTetherNetworkStateFromWifiNetwork( tether_network_guid_); if (successful_disassociation) { - PA_LOG(INFO) << "Wi-Fi network (ID \"" << wifi_network_guid_ << "\") " - << "successfully disassociated from Tether network (ID " - << "\"" << tether_network_guid_ << "\")."; + PA_LOG(VERBOSE) << "Wi-Fi network (ID \"" << wifi_network_guid_ << "\") " + << "successfully disassociated from Tether network (ID " + << "\"" << tether_network_guid_ << "\")."; } else { - PA_LOG(INFO) << "Wi-Fi network (ID \"" << wifi_network_guid_ << "\") " - << "failed to disassociate from Tether network ID (\"" - << tether_network_guid_ << "\")."; + PA_LOG(ERROR) << "Wi-Fi network (ID \"" << wifi_network_guid_ << "\") " + << "failed to disassociate from Tether network ID (\"" + << tether_network_guid_ << "\")."; } CompleteActiveConnectionAttempt(false /* success */); @@ -195,15 +195,15 @@ void WifiHotspotConnector::InitiateConnectionToCurrentNetwork() { network_state_handler_->AssociateTetherNetworkStateWithWifiNetwork( tether_network_guid_, wifi_network_guid_); if (successful_association) { - PA_LOG(INFO) << "Wi-Fi network (ID \"" << wifi_network_guid_ << "\") " - << "successfully associated with Tether network (ID \"" - << tether_network_guid_ << "\"). Starting connection " - << "attempt."; + PA_LOG(VERBOSE) << "Wi-Fi network (ID \"" << wifi_network_guid_ << "\") " + << "successfully associated with Tether network (ID \"" + << tether_network_guid_ << "\"). Starting connection " + << "attempt."; } else { - PA_LOG(INFO) << "Wi-Fi network (ID \"" << wifi_network_guid_ << "\") " - << "failed to associate with Tether network (ID \"" - << tether_network_guid_ << "\"). Starting connection " - << "attempt."; + PA_LOG(ERROR) << "Wi-Fi network (ID \"" << wifi_network_guid_ << "\") " + << "failed to associate with Tether network (ID \"" + << tether_network_guid_ << "\"). Starting connection " + << "attempt."; } // Initiate a connection to the network. @@ -264,10 +264,10 @@ void WifiHotspotConnector::CreateWifiConfiguration() { base::DictionaryValue WifiHotspotConnector::CreateWifiPropertyDictionary( const std::string& ssid, const std::string& password) { - PA_LOG(INFO) << "Creating network configuration. " - << "SSID: " << ssid << ", " - << "Password: " << password << ", " - << "Wi-Fi network GUID: " << wifi_network_guid_; + PA_LOG(VERBOSE) << "Creating network configuration. " + << "SSID: " << ssid << ", " + << "Password: " << password << ", " + << "Wi-Fi network GUID: " << wifi_network_guid_; base::DictionaryValue properties; diff --git a/chromeos/components/tether/wifi_hotspot_disconnector_impl.cc b/chromeos/components/tether/wifi_hotspot_disconnector_impl.cc index f1a6c814de32ab..7057c618d1f380 100644 --- a/chromeos/components/tether/wifi_hotspot_disconnector_impl.cc +++ b/chromeos/components/tether/wifi_hotspot_disconnector_impl.cc @@ -96,8 +96,8 @@ void WifiHotspotDisconnectorImpl::OnSuccessfulWifiDisconnect( const std::string& wifi_network_path, const base::Closure& success_callback, const network_handler::StringResultCallback& error_callback) { - PA_LOG(INFO) << "Successfully disconnected from Wi-Fi network with GUID " - << wifi_network_guid << "."; + PA_LOG(VERBOSE) << "Successfully disconnected from Wi-Fi network with GUID " + << wifi_network_guid << "."; CleanUpAfterWifiDisconnection(true /* success */, wifi_network_path, success_callback, error_callback); } diff --git a/chromeos/services/device_sync/device_sync_impl.cc b/chromeos/services/device_sync/device_sync_impl.cc index f21c9250af15e0..7e203da96d3ee2 100644 --- a/chromeos/services/device_sync/device_sync_impl.cc +++ b/chromeos/services/device_sync/device_sync_impl.cc @@ -236,7 +236,7 @@ DeviceSyncImpl::DeviceSyncImpl( set_software_feature_timer_(std::move(timer)), status_(Status::FETCHING_ACCOUNT_INFO), weak_ptr_factory_(this) { - PA_LOG(INFO) << "DeviceSyncImpl: Initializing."; + PA_LOG(VERBOSE) << "DeviceSyncImpl: Initializing."; ProcessPrimaryAccountInfo(identity_manager_->GetPrimaryAccountInfo()); } @@ -374,7 +374,8 @@ void DeviceSyncImpl::GetDebugInfo(GetDebugInfoCallback callback) { } void DeviceSyncImpl::OnEnrollmentFinished(bool success) { - PA_LOG(INFO) << "DeviceSyncImpl: Enrollment finished; success = " << success; + PA_LOG(VERBOSE) << "DeviceSyncImpl: Enrollment finished; success = " + << success; if (!success) return; @@ -386,8 +387,8 @@ void DeviceSyncImpl::OnEnrollmentFinished(bool success) { } void DeviceSyncImpl::OnSyncDeviceListChanged() { - PA_LOG(INFO) << "DeviceSyncImpl: Synced devices changed; notifying " - << "observers."; + PA_LOG(VERBOSE) << "DeviceSyncImpl: Synced devices changed; notifying " + << "observers."; NotifyOnNewDevicesSynced(); // Iterate through pending SetSoftwareFeature() requests. If any of them have @@ -399,8 +400,9 @@ void DeviceSyncImpl::OnSyncDeviceListChanged() { continue; } - PA_LOG(INFO) << "DeviceSyncImpl::OnSyncDeviceListChanged(): Feature state " - << "updated via device sync; notifying success callbacks."; + PA_LOG(VERBOSE) + << "DeviceSyncImpl::OnSyncDeviceListChanged(): Feature state " + << "updated via device sync; notifying success callbacks."; it->second->InvokeCallback(mojom::NetworkRequestResult::kSuccess); it = id_to_pending_set_software_feature_request_map_.erase(it); } @@ -448,7 +450,7 @@ void DeviceSyncImpl::ConnectToPrefStore() { auto pref_registry = pref_connection_delegate_->CreatePrefRegistry(); RegisterDeviceSyncPrefs(pref_registry.get()); - PA_LOG(INFO) << "DeviceSyncImpl: Connecting to pref service."; + PA_LOG(VERBOSE) << "DeviceSyncImpl: Connecting to pref service."; pref_connection_delegate_->ConnectToPrefService( connector_, std::move(pref_registry), base::Bind(&DeviceSyncImpl::OnConnectedToPrefService, @@ -460,8 +462,8 @@ void DeviceSyncImpl::OnConnectedToPrefService( DCHECK(status_ == Status::CONNECTING_TO_USER_PREFS); status_ = Status::WAITING_FOR_ENROLLMENT; - PA_LOG(INFO) << "DeviceSyncImpl: Connected to pref service; initializing " - << "CryptAuth managers."; + PA_LOG(VERBOSE) << "DeviceSyncImpl: Connected to pref service; initializing " + << "CryptAuth managers."; pref_service_ = std::move(pref_service); InitializeCryptAuthManagementObjects(); @@ -469,7 +471,7 @@ void DeviceSyncImpl::OnConnectedToPrefService( // continue. Once enrollment has finished, OnEnrollmentFinished() is invoked, // which finishes the initialization flow. if (!cryptauth_enrollment_manager_->IsEnrollmentValid()) { - PA_LOG(INFO) << "DeviceSyncImpl: Waiting for enrollment to complete."; + PA_LOG(VERBOSE) << "DeviceSyncImpl: Waiting for enrollment to complete."; return; } @@ -532,8 +534,8 @@ void DeviceSyncImpl::CompleteInitializationAfterSuccessfulEnrollment() { status_ = Status::READY; - PA_LOG(INFO) << "DeviceSyncImpl: CryptAuth Enrollment is valid; service " - << "fully initialized."; + PA_LOG(VERBOSE) << "DeviceSyncImpl: CryptAuth Enrollment is valid; service " + << "fully initialized."; } base::Optional @@ -555,9 +557,9 @@ DeviceSyncImpl::GetSyncedDeviceWithPublicKey( } void DeviceSyncImpl::OnSetSoftwareFeatureStateSuccess() { - PA_LOG(INFO) << "DeviceSyncImpl::OnSetSoftwareFeatureStateSuccess(): " - << "Successfully completed SetSoftwareFeatureState() call; " - << "requesting force sync."; + PA_LOG(VERBOSE) << "DeviceSyncImpl::OnSetSoftwareFeatureStateSuccess(): " + << "Successfully completed SetSoftwareFeatureState() call; " + << "requesting force sync."; cryptauth_device_manager_->ForceSyncNow( cryptauth::INVOCATION_REASON_FEATURE_TOGGLED); diff --git a/chromeos/services/device_sync/device_sync_service.cc b/chromeos/services/device_sync/device_sync_service.cc index 40d3d7322d59e3..409ca158f72db4 100644 --- a/chromeos/services/device_sync/device_sync_service.cc +++ b/chromeos/services/device_sync/device_sync_service.cc @@ -28,7 +28,7 @@ DeviceSyncService::DeviceSyncService( DeviceSyncService::~DeviceSyncService() = default; void DeviceSyncService::OnStart() { - PA_LOG(INFO) << "DeviceSyncService::OnStart()"; + PA_LOG(VERBOSE) << "DeviceSyncService::OnStart()"; // context() cannot be invoked until after the constructor is run, so // |device_sync_impl_| cannot be initialized until OnStart(). @@ -45,8 +45,8 @@ void DeviceSyncService::OnBindInterface( const service_manager::BindSourceInfo& source_info, const std::string& interface_name, mojo::ScopedMessagePipeHandle interface_pipe) { - PA_LOG(INFO) << "DeviceSyncService::OnBindInterface() from interface " - << interface_name << "."; + PA_LOG(VERBOSE) << "DeviceSyncService::OnBindInterface() from interface " + << interface_name << "."; registry_.BindInterface(interface_name, std::move(interface_pipe)); } diff --git a/chromeos/services/device_sync/public/cpp/device_sync_client_impl.cc b/chromeos/services/device_sync/public/cpp/device_sync_client_impl.cc index d7d33579950475..06152df28e625e 100644 --- a/chromeos/services/device_sync/public/cpp/device_sync_client_impl.cc +++ b/chromeos/services/device_sync/public/cpp/device_sync_client_impl.cc @@ -168,9 +168,9 @@ void DeviceSyncClientImpl::OnGetSyncedDevicesCompleted( const base::Optional>& remote_devices) { if (!remote_devices) { - PA_LOG(INFO) << "Tried to fetch synced devices before service was fully " - "initialized; waiting for sync to complete before " - "continuing."; + PA_LOG(VERBOSE) << "Tried to fetch synced devices before service was fully " + "initialized; waiting for sync to complete before " + "continuing."; return; } @@ -195,9 +195,9 @@ void DeviceSyncClientImpl::OnGetSyncedDevicesCompleted( void DeviceSyncClientImpl::OnGetLocalDeviceMetadataCompleted( const base::Optional& local_device_metadata) { if (!local_device_metadata) { - PA_LOG(INFO) << "Tried to get local device metadata before service was " - "fully initialized; waiting for enrollment to complete " - "before continuing."; + PA_LOG(VERBOSE) << "Tried to get local device metadata before service was " + "fully initialized; waiting for enrollment to complete " + "before continuing."; return; } diff --git a/chromeos/services/multidevice_setup/account_status_change_delegate_notifier_impl.cc b/chromeos/services/multidevice_setup/account_status_change_delegate_notifier_impl.cc index a8c5cdc270e9b6..0b69834362c54e 100644 --- a/chromeos/services/multidevice_setup/account_status_change_delegate_notifier_impl.cc +++ b/chromeos/services/multidevice_setup/account_status_change_delegate_notifier_impl.cc @@ -154,9 +154,10 @@ void AccountStatusChangeDelegateNotifierImpl::OnOobeCompleted() { void AccountStatusChangeDelegateNotifierImpl::CheckForMultiDeviceEvents( const HostStatusProvider::HostStatusWithDevice& host_status_with_device) { if (!delegate()) { - PA_LOG(INFO) << "AccountStatusChangeDelegateNotifierImpl::" - << "CheckForMultiDeviceEvents(): Tried to check for potential " - << "events, but no delegate was set."; + PA_LOG(WARNING) + << "AccountStatusChangeDelegateNotifierImpl::" + << "CheckForMultiDeviceEvents(): Tried to check for potential " + << "events, but no delegate was set."; return; } diff --git a/chromeos/services/multidevice_setup/device_reenroller.cc b/chromeos/services/multidevice_setup/device_reenroller.cc index 36dd56f738c6cf..a9cf1752cce95f 100644 --- a/chromeos/services/multidevice_setup/device_reenroller.cc +++ b/chromeos/services/multidevice_setup/device_reenroller.cc @@ -119,7 +119,7 @@ void DeviceReenroller::AttemptReenrollmentIfNecessary() { return; } - PA_LOG(INFO) + PA_LOG(VERBOSE) << "Supported software feature mismatch. Attempting re-enrollment now." << std::endl << " ---GcmDeviceInfo Supported Software Features---" << std::endl diff --git a/chromeos/services/multidevice_setup/feature_state_manager_impl.cc b/chromeos/services/multidevice_setup/feature_state_manager_impl.cc index 8e215fdf732c79..02a17fdc3b5c5a 100644 --- a/chromeos/services/multidevice_setup/feature_state_manager_impl.cc +++ b/chromeos/services/multidevice_setup/feature_state_manager_impl.cc @@ -223,9 +223,9 @@ void FeatureStateManagerImpl::UpdateFeatureStateCache( if (previous_cached_feature_state_map == cached_feature_state_map_) return; - PA_LOG(INFO) << "Feature states map changed. Old map: " - << previous_cached_feature_state_map - << ", new map: " << cached_feature_state_map_; + PA_LOG(VERBOSE) << "Feature states map changed. Old map: " + << previous_cached_feature_state_map + << ", new map: " << cached_feature_state_map_; NotifyFeatureStatesChange(cached_feature_state_map_); } diff --git a/chromeos/services/multidevice_setup/grandfathered_easy_unlock_host_disabler.cc b/chromeos/services/multidevice_setup/grandfathered_easy_unlock_host_disabler.cc index 9ec2eaa7dd26d0..ff5fcc952885db 100644 --- a/chromeos/services/multidevice_setup/grandfathered_easy_unlock_host_disabler.cc +++ b/chromeos/services/multidevice_setup/grandfathered_easy_unlock_host_disabler.cc @@ -135,8 +135,8 @@ void GrandfatheredEasyUnlockHostDisabler::OnSetSoftwareFeatureStateResult( result_code == device_sync::mojom::NetworkRequestResult::kSuccess; if (success) { - PA_LOG(INFO) << "Successfully disabled EASY_UNLOCK_HOST on device " - << device.GetTruncatedDeviceIdForLogs(); + PA_LOG(VERBOSE) << "Successfully disabled EASY_UNLOCK_HOST on device " + << device.GetTruncatedDeviceIdForLogs(); } else { PA_LOG(WARNING) << "Failed to disable EASY_UNLOCK_HOST on device " << device.GetTruncatedDeviceIdForLogs() diff --git a/chromeos/services/multidevice_setup/host_backend_delegate_impl.cc b/chromeos/services/multidevice_setup/host_backend_delegate_impl.cc index 83ca4966f80efe..92b968b8349586 100644 --- a/chromeos/services/multidevice_setup/host_backend_delegate_impl.cc +++ b/chromeos/services/multidevice_setup/host_backend_delegate_impl.cc @@ -262,9 +262,9 @@ void HostBackendDelegateImpl::OnNewDevicesSynced() { : kNoHostForLogging; host_from_last_sync_ = host_from_sync; - PA_LOG(INFO) << "HostBackendDelegateImpl::OnNewDevicesSynced(): New host " - << "device has been set. Old host device ID: " << old_host_id - << ", New host device ID: " << new_host_id; + PA_LOG(VERBOSE) << "HostBackendDelegateImpl::OnNewDevicesSynced(): New host " + << "device has been set. Old host device ID: " << old_host_id + << ", New host device ID: " << new_host_id; // If there is a pending request and the new host fulfills that pending // request, there is no longer a pending request. @@ -310,7 +310,7 @@ void HostBackendDelegateImpl::OnSetSoftwareFeatureStateResult( << ", Attempted to enable: " << (attempted_to_enable ? "true" : "false"); if (success) { - PA_LOG(INFO) << ss.str(); + PA_LOG(VERBOSE) << ss.str(); return; } diff --git a/chromeos/services/multidevice_setup/host_device_timestamp_manager_impl.cc b/chromeos/services/multidevice_setup/host_device_timestamp_manager_impl.cc index 4d492632da6457..37aaa4539f55f7 100644 --- a/chromeos/services/multidevice_setup/host_device_timestamp_manager_impl.cc +++ b/chromeos/services/multidevice_setup/host_device_timestamp_manager_impl.cc @@ -121,9 +121,10 @@ void HostDeviceTimestampManagerImpl::OnHostStatusChange( pref_service_->SetInt64(kSetupFlowCompletedPrefName, clock_->Now().ToJavaTime()); pref_service_->SetBoolean(kWasHostSetFromThisChromebookPrefName, true); - PA_LOG(INFO) << "HostDeviceTimestampManagerImpl::OnHostStatusChange(): " - << "Setup flow successfully completed. Recording timestamp " - << pref_service_->GetInt64(kSetupFlowCompletedPrefName) << "."; + PA_LOG(VERBOSE) << "HostDeviceTimestampManagerImpl::OnHostStatusChange(): " + << "Setup flow successfully completed. Recording timestamp " + << pref_service_->GetInt64(kSetupFlowCompletedPrefName) + << "."; } // Check if a host has been verified. @@ -131,10 +132,11 @@ void HostDeviceTimestampManagerImpl::OnHostStatusChange( mojom::HostStatus::kHostVerified) { pref_service_->SetInt64(kHostVerifiedUpdateReceivedPrefName, clock_->Now().ToJavaTime()); - PA_LOG(INFO) << "HostDeviceTimestampManagerImpl::OnHostStatusChange(): " - << "New host verified. Recording timestamp " - << pref_service_->GetInt64(kHostVerifiedUpdateReceivedPrefName) - << "."; + PA_LOG(VERBOSE) << "HostDeviceTimestampManagerImpl::OnHostStatusChange(): " + << "New host verified. Recording timestamp " + << pref_service_->GetInt64( + kHostVerifiedUpdateReceivedPrefName) + << "."; } // If there is no host set, set the "was host set form this Chromebook" bit to diff --git a/chromeos/services/multidevice_setup/host_status_provider_impl.cc b/chromeos/services/multidevice_setup/host_status_provider_impl.cc index 02ba75b6ab0a12..916a1d9668de2f 100644 --- a/chromeos/services/multidevice_setup/host_status_provider_impl.cc +++ b/chromeos/services/multidevice_setup/host_status_provider_impl.cc @@ -97,17 +97,17 @@ void HostStatusProviderImpl::CheckForUpdatedStatusAndNotifyIfChanged() { if (current_status_and_device == current_status_and_device_) return; - PA_LOG(INFO) << "HostStatusProviderImpl::" - << "CheckForUpdatedStatusAndNotifyIfChanged(): Host status " - << "changed. New status: " - << current_status_and_device.host_status() - << ", Old status: " << current_status_and_device_.host_status() - << ", Host device " - << "ID: " - << (current_status_and_device.host_device() - ? current_status_and_device.host_device() - ->GetTruncatedDeviceIdForLogs() - : "[no host]"); + PA_LOG(VERBOSE) << "HostStatusProviderImpl::" + << "CheckForUpdatedStatusAndNotifyIfChanged(): Host status " + << "changed. New status: " + << current_status_and_device.host_status() << ", Old status: " + << current_status_and_device_.host_status() + << ", Host device " + << "ID: " + << (current_status_and_device.host_device() + ? current_status_and_device.host_device() + ->GetTruncatedDeviceIdForLogs() + : "[no host]"); current_status_and_device_ = current_status_and_device; NotifyHostStatusChange(current_status_and_device_.host_status(), diff --git a/chromeos/services/multidevice_setup/host_verifier_impl.cc b/chromeos/services/multidevice_setup/host_verifier_impl.cc index 8034383819d61d..f4e001a2b0145d 100644 --- a/chromeos/services/multidevice_setup/host_verifier_impl.cc +++ b/chromeos/services/multidevice_setup/host_verifier_impl.cc @@ -239,8 +239,8 @@ void HostVerifierImpl::AttemptHostVerification() { return; } - PA_LOG(INFO) << "HostVerifierImpl::AttemptHostVerification(): Attempting " - << "host verification now."; + PA_LOG(VERBOSE) << "HostVerifierImpl::AttemptHostVerification(): Attempting " + << "host verification now."; device_sync_client_->FindEligibleDevices( cryptauth::SoftwareFeature::BETTER_TOGETHER_HOST, base::DoNothing()); } diff --git a/chromeos/services/multidevice_setup/multidevice_setup_impl.cc b/chromeos/services/multidevice_setup/multidevice_setup_impl.cc index 0754601075452f..dd0afa5bc5aee1 100644 --- a/chromeos/services/multidevice_setup/multidevice_setup_impl.cc +++ b/chromeos/services/multidevice_setup/multidevice_setup_impl.cc @@ -259,8 +259,8 @@ void MultiDeviceSetupImpl::TriggerEventForDebugging( return; } - PA_LOG(INFO) << "MultiDeviceSetupImpl::TriggerEventForDebugging(" << type - << ") called."; + PA_LOG(VERBOSE) << "MultiDeviceSetupImpl::TriggerEventForDebugging(" << type + << ") called."; mojom::AccountStatusChangeDelegate* delegate = delegate_notifier_->delegate_ptr_.get(); diff --git a/chromeos/services/multidevice_setup/multidevice_setup_service.cc b/chromeos/services/multidevice_setup/multidevice_setup_service.cc index f2b3e6ddcf3876..5c46d9dc5394e4 100644 --- a/chromeos/services/multidevice_setup/multidevice_setup_service.cc +++ b/chromeos/services/multidevice_setup/multidevice_setup_service.cc @@ -59,7 +59,7 @@ MultiDeviceSetupService::MultiDeviceSetupService( MultiDeviceSetupService::~MultiDeviceSetupService() = default; void MultiDeviceSetupService::OnStart() { - PA_LOG(INFO) << "MultiDeviceSetupService::OnStart()"; + PA_LOG(VERBOSE) << "MultiDeviceSetupService::OnStart()"; registry_.AddInterface( base::BindRepeating(&MultiDeviceSetupBase::BindRequest, base::Unretained(multidevice_setup_.get()))); @@ -72,8 +72,9 @@ void MultiDeviceSetupService::OnBindInterface( const service_manager::BindSourceInfo& source_info, const std::string& interface_name, mojo::ScopedMessagePipeHandle interface_pipe) { - PA_LOG(INFO) << "MultiDeviceSetupService::OnBindInterface() from interface " - << interface_name << "."; + PA_LOG(VERBOSE) + << "MultiDeviceSetupService::OnBindInterface() from interface " + << interface_name << "."; registry_.BindInterface(interface_name, std::move(interface_pipe)); } diff --git a/chromeos/services/secure_channel/ble_connection_manager.cc b/chromeos/services/secure_channel/ble_connection_manager.cc index cc3270490d4177..ca9228167137c1 100644 --- a/chromeos/services/secure_channel/ble_connection_manager.cc +++ b/chromeos/services/secure_channel/ble_connection_manager.cc @@ -65,8 +65,8 @@ void BleConnectionManager::AttemptBleInitiatorConnection( std::make_unique( connection_priority, std::move(success_callback), failure_callback))); - PA_LOG(INFO) << "BleConnectionManager::AttemptBleInitiatorConnection(): " - << "Attempting connection; details: " << details; + PA_LOG(VERBOSE) << "BleConnectionManager::AttemptBleInitiatorConnection(): " + << "Attempting connection; details: " << details; PerformAttemptBleInitiatorConnection(device_id_pair, connection_priority); } @@ -86,10 +86,11 @@ void BleConnectionManager::UpdateBleInitiatorConnectionPriority( initiator_entry.connection_priority = connection_priority; - PA_LOG(INFO) << "BleConnectionManager::" - << "UpdateBleInitiatorConnectionPriority(): Updating connection " - << "priority; ID pair: " << device_id_pair - << ", Priority: " << connection_priority; + PA_LOG(VERBOSE) + << "BleConnectionManager::" + << "UpdateBleInitiatorConnectionPriority(): Updating connection " + << "priority; ID pair: " << device_id_pair + << ", Priority: " << connection_priority; PerformUpdateBleInitiatorConnectionPriority(device_id_pair, connection_priority); } @@ -98,9 +99,10 @@ void BleConnectionManager::CancelBleInitiatorConnectionAttempt( const DeviceIdPair& device_id_pair) { RemoveRequestMetadata(device_id_pair, ConnectionRole::kInitiatorRole); - PA_LOG(INFO) << "BleConnectionManager::" - << "CancelBleInitiatorConnectionAttempt(): Canceling connection " - << "attempt; ID pair: " << device_id_pair; + PA_LOG(VERBOSE) + << "BleConnectionManager::" + << "CancelBleInitiatorConnectionAttempt(): Canceling connection " + << "attempt; ID pair: " << device_id_pair; PerformCancelBleInitiatorConnectionAttempt(device_id_pair); } @@ -127,8 +129,8 @@ void BleConnectionManager::AttemptBleListenerConnection( std::make_unique( connection_priority, std::move(success_callback), failure_callback))); - PA_LOG(INFO) << "BleConnectionManager::AttemptBleListenerConnection(): " - << "Attempting connection; details: " << details; + PA_LOG(VERBOSE) << "BleConnectionManager::AttemptBleListenerConnection(): " + << "Attempting connection; details: " << details; PerformAttemptBleListenerConnection(device_id_pair, connection_priority); } @@ -148,10 +150,11 @@ void BleConnectionManager::UpdateBleListenerConnectionPriority( listener_entry.connection_priority = connection_priority; - PA_LOG(INFO) << "BleConnectionManager::" - << "UpdateBleListenerConnectionPriority(): Updating connection " - << "priority; ID pair: " << device_id_pair << ", Priority" - << connection_priority; + PA_LOG(VERBOSE) + << "BleConnectionManager::" + << "UpdateBleListenerConnectionPriority(): Updating connection " + << "priority; ID pair: " << device_id_pair << ", Priority" + << connection_priority; PerformUpdateBleListenerConnectionPriority(device_id_pair, connection_priority); } @@ -160,9 +163,10 @@ void BleConnectionManager::CancelBleListenerConnectionAttempt( const DeviceIdPair& device_id_pair) { RemoveRequestMetadata(device_id_pair, ConnectionRole::kListenerRole); - PA_LOG(INFO) << "BleConnectionManager::" - << "CancelBleListenerConnectionAttempt(): Canceling connection " - << "attempt; ID pair: " << device_id_pair; + PA_LOG(VERBOSE) + << "BleConnectionManager::" + << "CancelBleListenerConnectionAttempt(): Canceling connection " + << "attempt; ID pair: " << device_id_pair; PerformCancelBleListenerConnectionAttempt(device_id_pair); } @@ -207,18 +211,18 @@ bool BleConnectionManager::DoesAttemptExist(const DeviceIdPair& device_id_pair, void BleConnectionManager::NotifyBleInitiatorFailure( const DeviceIdPair& device_id_pair, BleInitiatorFailureType failure_type) { - PA_LOG(INFO) << "BleConnectionManager::NotifyBleInitiatorFailure(): " - << "Notifying client of failure. ID pair: " << device_id_pair - << ", Failure type: " << failure_type; + PA_LOG(VERBOSE) << "BleConnectionManager::NotifyBleInitiatorFailure(): " + << "Notifying client of failure. ID pair: " << device_id_pair + << ", Failure type: " << failure_type; GetInitiatorEntry(device_id_pair).failure_callback.Run(failure_type); } void BleConnectionManager::NotifyBleListenerFailure( const DeviceIdPair& device_id_pair, BleListenerFailureType failure_type) { - PA_LOG(INFO) << "BleConnectionManager::NotifyBleListenerFailure(): " - << "Notifying client of failure. ID pair: " << device_id_pair - << ", Failure type: " << failure_type; + PA_LOG(VERBOSE) << "BleConnectionManager::NotifyBleListenerFailure(): " + << "Notifying client of failure. ID pair: " << device_id_pair + << ", Failure type: " << failure_type; GetListenerEntry(device_id_pair).failure_callback.Run(failure_type); } @@ -226,9 +230,9 @@ void BleConnectionManager::NotifyConnectionSuccess( const DeviceIdPair& device_id_pair, ConnectionRole connection_role, std::unique_ptr authenticated_channel) { - PA_LOG(INFO) << "BleConnectionManager::NotifyConnectionSuccess(): " - << "Notifying client of successful connection. ID pair: " - << device_id_pair << ", Role: " << connection_role; + PA_LOG(VERBOSE) << "BleConnectionManager::NotifyConnectionSuccess(): " + << "Notifying client of successful connection. ID pair: " + << device_id_pair << ", Role: " << connection_role; // For each case, grab the success callback out of the map first, then remove // the associated metadata before invoking the callback. diff --git a/chromeos/services/secure_channel/ble_connection_manager_impl.cc b/chromeos/services/secure_channel/ble_connection_manager_impl.cc index 78c3b132efc96d..8c5efc8db8028b 100644 --- a/chromeos/services/secure_channel/ble_connection_manager_impl.cc +++ b/chromeos/services/secure_channel/ble_connection_manager_impl.cc @@ -325,12 +325,12 @@ void BleConnectionManagerImpl::ProcessPotentialLingeringChannel( remote_device_id_to_secure_channel_map_.erase(remote_device_id); // Disconnect the channel, since it is lingering with no active request. - PA_LOG(INFO) << "BleConnectionManagerImpl::" - << "ProcessPotentialLingeringChannel(): Disconnecting lingering " - << "channel which is no longer associated with any active " - << "requests. Remote device ID: " - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - remote_device_id); + PA_LOG(VERBOSE) + << "BleConnectionManagerImpl::" + << "ProcessPotentialLingeringChannel(): Disconnecting lingering " + << "channel which is no longer associated with any active " + << "requests. Remote device ID: " + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs(remote_device_id); channel_with_roll.first->RemoveObserver(this); secure_channel_disconnector_->DisconnectSecureChannel( std::move(channel_with_roll.first)); diff --git a/chromeos/services/secure_channel/error_tolerant_ble_advertisement_impl.cc b/chromeos/services/secure_channel/error_tolerant_ble_advertisement_impl.cc index 4b3b3cb4fa9c16..b3fcffe1db370d 100644 --- a/chromeos/services/secure_channel/error_tolerant_ble_advertisement_impl.cc +++ b/chromeos/services/secure_channel/error_tolerant_ble_advertisement_impl.cc @@ -188,8 +188,8 @@ void ErrorTolerantBleAdvertisementImpl::OnAdvertisementRegistered( advertisement_ = advertisement; advertisement_->AddObserver(this); - PA_LOG(INFO) << "Advertisement registered. Request: " << device_id_pair() - << ", Service data: " << advertisement_data_->DataInHex(); + PA_LOG(VERBOSE) << "Advertisement registered. Request: " << device_id_pair() + << ", Service data: " << advertisement_data_->DataInHex(); UpdateRegistrationStatus(); } diff --git a/chromeos/services/secure_channel/pending_connection_manager_impl.cc b/chromeos/services/secure_channel/pending_connection_manager_impl.cc index f372325d4cb10d..80bee9ef31b5bf 100644 --- a/chromeos/services/secure_channel/pending_connection_manager_impl.cc +++ b/chromeos/services/secure_channel/pending_connection_manager_impl.cc @@ -68,12 +68,13 @@ void PendingConnectionManagerImpl::HandleConnectionRequest( // If the client has canceled the request, it does not need to be processed. if (!client_connection_parameters->IsClientWaitingForResponse()) { - PA_LOG(INFO) << "PendingConnectionManagerImpl::HandleConnectionRequest(): " - << "Request was canceled by the client before being passed to " - << "PendingConnectionManager; ignoring. Details: " - << connection_attempt_details - << ", Parameters: " << *client_connection_parameters - << ", Priority: " << connection_priority; + PA_LOG(VERBOSE) + << "PendingConnectionManagerImpl::HandleConnectionRequest(): " + << "Request was canceled by the client before being passed to " + << "PendingConnectionManager; ignoring. Details: " + << connection_attempt_details + << ", Parameters: " << *client_connection_parameters + << ", Priority: " << connection_priority; return; } diff --git a/chromeos/services/secure_channel/pending_connection_request_base.h b/chromeos/services/secure_channel/pending_connection_request_base.h index 96ace5d18517cc..a5e9377ea57594 100644 --- a/chromeos/services/secure_channel/pending_connection_request_base.h +++ b/chromeos/services/secure_channel/pending_connection_request_base.h @@ -100,10 +100,11 @@ class PendingConnectionRequestBase DCHECK(!has_finished_without_connection_); has_finished_without_connection_ = true; - PA_LOG(INFO) << "Request finished without connection; notifying delegate. " - << "Request type: \"" << readable_request_type_for_logging_ - << "\", Reason: " << reason - << ", Client parameters: " << *client_connection_parameters_; + PA_LOG(VERBOSE) + << "Request finished without connection; notifying delegate. " + << "Request type: \"" << readable_request_type_for_logging_ + << "\", Reason: " << reason + << ", Client parameters: " << *client_connection_parameters_; NotifyRequestFinishedWithoutConnection(reason); } diff --git a/chromeos/services/secure_channel/secure_channel_impl.cc b/chromeos/services/secure_channel/secure_channel_impl.cc index 0f973f206a9e3c..0853b4dbf8dbdd 100644 --- a/chromeos/services/secure_channel/secure_channel_impl.cc +++ b/chromeos/services/secure_channel/secure_channel_impl.cc @@ -139,10 +139,11 @@ void SecureChannelImpl::OnDisconnected( // connection to disconnect), pass the request off to // PendingConnectionManager. for (auto& details : pending_requests_it->second) { - PA_LOG(INFO) << "SecureChannelImpl::OnDisconnected(): Disconnection " - << "completed; starting pending connection attempt. Request: " - << *details.client_connection_parameters - << ", Attempt details: " << details.connection_attempt_details; + PA_LOG(VERBOSE) + << "SecureChannelImpl::OnDisconnected(): Disconnection " + << "completed; starting pending connection attempt. Request: " + << *details.client_connection_parameters + << ", Attempt details: " << details.connection_attempt_details; pending_connection_manager_->HandleConnectionRequest( details.connection_attempt_details, std::move(details.client_connection_parameters), @@ -228,29 +229,31 @@ void SecureChannelImpl::ProcessConnectionRequest( connection_attempt_details.GetAssociatedConnectionDetails(); switch (active_connection_manager_->GetConnectionState(connection_details)) { case ActiveConnectionManager::ConnectionState::kActiveConnectionExists: - PA_LOG(INFO) << "SecureChannelImpl::" << api_fn_name << "(): Adding " - << "request to active channel. Request: " - << *client_connection_parameters << ", Local device ID: \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - local_device.GetDeviceId()) - << "\"" - << ", Role: " << connection_role - << ", Priority: " << connection_priority - << ", Details: " << connection_details; + PA_LOG(VERBOSE) << "SecureChannelImpl::" << api_fn_name << "(): Adding " + << "request to active channel. Request: " + << *client_connection_parameters + << ", Local device ID: \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + local_device.GetDeviceId()) + << "\"" + << ", Role: " << connection_role + << ", Priority: " << connection_priority + << ", Details: " << connection_details; active_connection_manager_->AddClientToChannel( std::move(client_connection_parameters), connection_details); break; case ActiveConnectionManager::ConnectionState::kNoConnectionExists: - PA_LOG(INFO) << "SecureChannelImpl::" << api_fn_name << "(): Starting " - << "pending connection attempt. Request: " - << *client_connection_parameters << ", Local device ID: \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - local_device.GetDeviceId()) - << "\"" - << ", Role: " << connection_role - << ", Priority: " << connection_priority - << ", Details: " << connection_details; + PA_LOG(VERBOSE) << "SecureChannelImpl::" << api_fn_name << "(): Starting " + << "pending connection attempt. Request: " + << *client_connection_parameters + << ", Local device ID: \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + local_device.GetDeviceId()) + << "\"" + << ", Role: " << connection_role + << ", Priority: " << connection_priority + << ", Details: " << connection_details; pending_connection_manager_->HandleConnectionRequest( connection_attempt_details, std::move(client_connection_parameters), connection_priority); @@ -258,17 +261,18 @@ void SecureChannelImpl::ProcessConnectionRequest( case ActiveConnectionManager::ConnectionState:: kDisconnectingConnectionExists: - PA_LOG(INFO) << "SecureChannelImpl::" << api_fn_name << "(): Received " - << "request for which a disconnecting connection exists. " - << "Waiting for connection to disconnect completely before " - << "continuing. Request: " << *client_connection_parameters - << ", Local device ID: \"" - << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( - local_device.GetDeviceId()) - << "\"" - << ", Role: " << connection_role - << ", Priority: " << connection_priority - << ", Details: " << connection_details; + PA_LOG(VERBOSE) + << "SecureChannelImpl::" << api_fn_name << "(): Received " + << "request for which a disconnecting connection exists. " + << "Waiting for connection to disconnect completely before " + << "continuing. Request: " << *client_connection_parameters + << ", Local device ID: \"" + << cryptauth::RemoteDeviceRef::TruncateDeviceIdForLogs( + local_device.GetDeviceId()) + << "\"" + << ", Role: " << connection_role + << ", Priority: " << connection_priority + << ", Details: " << connection_details; disconnecting_details_to_requests_map_[connection_details].emplace_back( std::move(client_connection_parameters), connection_attempt_details, connection_priority); diff --git a/chromeos/services/secure_channel/secure_channel_initializer.cc b/chromeos/services/secure_channel/secure_channel_initializer.cc index 317d5eb5d622de..ee7ecabc359af7 100644 --- a/chromeos/services/secure_channel/secure_channel_initializer.cc +++ b/chromeos/services/secure_channel/secure_channel_initializer.cc @@ -61,9 +61,9 @@ SecureChannelInitializer::ConnectionRequestArgs::~ConnectionRequestArgs() = SecureChannelInitializer::SecureChannelInitializer( scoped_refptr task_runner) : weak_ptr_factory_(this) { - PA_LOG(INFO) << "SecureChannelInitializer::SecureChannelInitializer(): " - << "Fetching Bluetooth adapter. All requests received before " - << "the adapter is fetched will be queued."; + PA_LOG(VERBOSE) << "SecureChannelInitializer::SecureChannelInitializer(): " + << "Fetching Bluetooth adapter. All requests received before " + << "the adapter is fetched will be queued."; // device::BluetoothAdapterFactory::SetAdapterForTesting() causes the // GetAdapter() callback to return synchronously. Thus, post the GetAdapter() @@ -116,9 +116,9 @@ void SecureChannelInitializer::InitiateConnectionToDevice( void SecureChannelInitializer::OnBluetoothAdapterReceived( scoped_refptr bluetooth_adapter) { - PA_LOG(INFO) << "SecureChannelInitializer::OnBluetoothAdapterReceived(): " - << "Bluetooth adapter has been fetched. Passing all queued " - << "requests to the service."; + PA_LOG(VERBOSE) << "SecureChannelInitializer::OnBluetoothAdapterReceived(): " + << "Bluetooth adapter has been fetched. Passing all queued " + << "requests to the service."; secure_channel_impl_ = SecureChannelImpl::Factory::Get()->BuildInstance(bluetooth_adapter); diff --git a/chromeos/services/secure_channel/secure_channel_service.cc b/chromeos/services/secure_channel/secure_channel_service.cc index 605a57d99ed687..650c41f50dfc46 100644 --- a/chromeos/services/secure_channel/secure_channel_service.cc +++ b/chromeos/services/secure_channel/secure_channel_service.cc @@ -22,7 +22,7 @@ SecureChannelService::SecureChannelService() = default; SecureChannelService::~SecureChannelService() = default; void SecureChannelService::OnStart() { - PA_LOG(INFO) << "SecureChannelService::OnStart()"; + PA_LOG(VERBOSE) << "SecureChannelService::OnStart()"; secure_channel_ = SecureChannelInitializer::Factory::Get()->BuildInstance(); @@ -35,8 +35,8 @@ void SecureChannelService::OnBindInterface( const service_manager::BindSourceInfo& source_info, const std::string& interface_name, mojo::ScopedMessagePipeHandle interface_pipe) { - PA_LOG(INFO) << "SecureChannelService::OnBindInterface() for interface " - << interface_name << "."; + PA_LOG(VERBOSE) << "SecureChannelService::OnBindInterface() for interface " + << interface_name << "."; registry_.BindInterface(interface_name, std::move(interface_pipe)); } diff --git a/components/cryptauth/cryptauth_api_call_flow.cc b/components/cryptauth/cryptauth_api_call_flow.cc index eb5cf00cd83b45..a8c6467b48fdce 100644 --- a/components/cryptauth/cryptauth_api_call_flow.cc +++ b/components/cryptauth/cryptauth_api_call_flow.cc @@ -97,10 +97,10 @@ void CryptAuthApiCallFlow::ProcessApiCallFailure( } if (body) { - PA_LOG(INFO) << "API call failed:\n" << *body; + PA_LOG(ERROR) << "API call failed:\n" << *body; } else { - PA_LOG(INFO) << "API call failed, no response body available, net_error:" - << net_error; + PA_LOG(ERROR) << "API call failed, no response body available, net_error:" + << net_error; } error_callback_.Run(*error); } diff --git a/components/cryptauth/cryptauth_device_manager_impl.cc b/components/cryptauth/cryptauth_device_manager_impl.cc index 8c7bbb7d848ca2..b42f29406dcdc2 100644 --- a/components/cryptauth/cryptauth_device_manager_impl.cc +++ b/components/cryptauth/cryptauth_device_manager_impl.cc @@ -647,7 +647,7 @@ void CryptAuthDeviceManagerImpl::OnGetMyDevicesSuccess( std::unique_ptr devices_as_list(new base::ListValue()); if (!response.devices().empty()) - PA_LOG(INFO) << "Devices were successfully synced."; + PA_LOG(VERBOSE) << "Devices were successfully synced."; for (const auto& device : response.devices()) { std::unique_ptr device_dictionary = diff --git a/components/cryptauth/cryptauth_enroller_impl.cc b/components/cryptauth/cryptauth_enroller_impl.cc index 8c5981ccd473a0..de91d95651456c 100644 --- a/components/cryptauth/cryptauth_enroller_impl.cc +++ b/components/cryptauth/cryptauth_enroller_impl.cc @@ -98,7 +98,8 @@ void CryptAuthEnrollerImpl::Enroll( void CryptAuthEnrollerImpl::OnKeyPairGenerated(const std::string& public_key, const std::string& private_key) { - PA_LOG(INFO) << "Ephemeral key pair generated, calling SetupEnrollment API."; + PA_LOG(VERBOSE) + << "Ephemeral key pair generated, calling SetupEnrollment API."; session_public_key_ = public_key; session_private_key_ = private_key; @@ -128,7 +129,8 @@ void CryptAuthEnrollerImpl::OnSetupEnrollmentSuccess( return; } - PA_LOG(INFO) << "SetupEnrollment request succeeded: deriving symmetric key."; + PA_LOG(VERBOSE) + << "SetupEnrollment request succeeded: deriving symmetric key."; setup_info_ = response.infos(0); device_info_.set_enrollment_session_id(setup_info_.enrollment_session_id()); @@ -145,8 +147,8 @@ void CryptAuthEnrollerImpl::OnSetupEnrollmentFailure( } void CryptAuthEnrollerImpl::OnKeyDerived(const std::string& symmetric_key) { - PA_LOG(INFO) << "Derived symmetric key, " - << "encrypting enrollment data for upload."; + PA_LOG(VERBOSE) << "Derived symmetric key, " + << "encrypting enrollment data for upload."; // Make sure we're enrolling the same public key used below to sign the // secure message. @@ -160,7 +162,7 @@ void CryptAuthEnrollerImpl::OnKeyDerived(const std::string& symmetric_key) { // The server verifies that the access token set here and in the header // of the FinishEnrollment() request are the same. device_info_.set_oauth_token(cryptauth_client_->GetAccessTokenUsed()); - PA_LOG(INFO) << "Using access token: " << device_info_.oauth_token(); + PA_LOG(VERBOSE) << "Using access token: " << device_info_.oauth_token(); symmetric_key_ = symmetric_key; SecureMessageDelegate::CreateOptions options; @@ -199,7 +201,7 @@ void CryptAuthEnrollerImpl::OnInnerSecureMessageCreated( void CryptAuthEnrollerImpl::OnOuterSecureMessageCreated( const std::string& outer_message) { - PA_LOG(INFO) << "SecureMessage created, calling FinishEnrollment API."; + PA_LOG(VERBOSE) << "SecureMessage created, calling FinishEnrollment API."; FinishEnrollmentRequest request; request.set_enrollment_session_id(setup_info_.enrollment_session_id()); diff --git a/components/cryptauth/cryptauth_enrollment_manager_impl.cc b/components/cryptauth/cryptauth_enrollment_manager_impl.cc index aafa12e20e890a..56816712fff77b 100644 --- a/components/cryptauth/cryptauth_enrollment_manager_impl.cc +++ b/components/cryptauth/cryptauth_enrollment_manager_impl.cc @@ -238,8 +238,8 @@ void CryptAuthEnrollmentManagerImpl::OnGCMRegistrationResult(bool success) { if (!sync_request_) return; - PA_LOG(INFO) << "GCM registration for CryptAuth Enrollment completed: " - << success; + PA_LOG(VERBOSE) << "GCM registration for CryptAuth Enrollment completed: " + << success; if (success) DoCryptAuthEnrollment(); else @@ -250,7 +250,7 @@ void CryptAuthEnrollmentManagerImpl::OnKeyPairGenerated( const std::string& public_key, const std::string& private_key) { if (!public_key.empty() && !private_key.empty()) { - PA_LOG(INFO) << "Key pair generated for CryptAuth enrollment"; + PA_LOG(VERBOSE) << "Key pair generated for CryptAuth enrollment"; // Store the keypair in Base64 format because pref values require readable // string values. std::string public_key_b64, private_key_b64; @@ -330,12 +330,13 @@ void CryptAuthEnrollmentManagerImpl::DoCryptAuthEnrollmentWithKeys() { base::Base64UrlEncode(GetUserPublicKey(), base::Base64UrlEncodePolicy::INCLUDE_PADDING, &public_key_b64); - PA_LOG(INFO) << "Making enrollment:\n" - << " public_key: " << public_key_b64 << "\n" - << " invocation_reason: " << invocation_reason << "\n" - << " gcm_registration_id: " << device_info.gcm_registration_id() - << " supported features: " - << GenerateSupportedFeaturesString(device_info); + PA_LOG(VERBOSE) << "Making enrollment:\n" + << " public_key: " << public_key_b64 << "\n" + << " invocation_reason: " << invocation_reason << "\n" + << " gcm_registration_id: " + << device_info.gcm_registration_id() + << " supported features: " + << GenerateSupportedFeaturesString(device_info); cryptauth_enroller_ = enroller_factory_->CreateInstance(); cryptauth_enroller_->Enroll( diff --git a/components/cryptauth/cryptauth_gcm_manager_impl.cc b/components/cryptauth/cryptauth_gcm_manager_impl.cc index 0de9655f681b0d..d71fd6e32560e3 100644 --- a/components/cryptauth/cryptauth_gcm_manager_impl.cc +++ b/components/cryptauth/cryptauth_gcm_manager_impl.cc @@ -74,7 +74,7 @@ CryptAuthGCMManagerImpl::~CryptAuthGCMManagerImpl() { void CryptAuthGCMManagerImpl::StartListening() { if (gcm_driver_->GetAppHandler(kCryptAuthGCMAppId) == this) { - PA_LOG(INFO) << "GCM app handler already added"; + PA_LOG(VERBOSE) << "GCM app handler already added"; return; } @@ -83,11 +83,11 @@ void CryptAuthGCMManagerImpl::StartListening() { void CryptAuthGCMManagerImpl::RegisterWithGCM() { if (registration_in_progress_) { - PA_LOG(INFO) << "GCM Registration is already in progress"; + PA_LOG(VERBOSE) << "GCM Registration is already in progress"; return; } - PA_LOG(INFO) << "Beginning GCM registration..."; + PA_LOG(VERBOSE) << "Beginning GCM registration..."; registration_in_progress_ = true; std::vector sender_ids(1, kCryptAuthGCMSenderId); @@ -125,10 +125,10 @@ void CryptAuthGCMManagerImpl::OnMessage(const std::string& app_id, fields.push_back(std::string(kv.first) + ": " + std::string(kv.second)); } - PA_LOG(INFO) << "GCM message received:\n" - << " sender_id: " << message.sender_id << "\n" - << " collapse_key: " << message.collapse_key << "\n" - << " data:\n " << base::JoinString(fields, "\n "); + PA_LOG(VERBOSE) << "GCM message received:\n" + << " sender_id: " << message.sender_id << "\n" + << " collapse_key: " << message.collapse_key << "\n" + << " data:\n " << base::JoinString(fields, "\n "); if (message.data.find(kRegistrationTickleTypeKey) == message.data.end()) { PA_LOG(WARNING) << "GCM message does not contain 'registrationTickleType'."; @@ -175,8 +175,8 @@ void CryptAuthGCMManagerImpl::OnRegistrationCompleted( return; } - PA_LOG(INFO) << "GCM registration success, registration_id=" - << registration_id; + PA_LOG(VERBOSE) << "GCM registration success, registration_id=" + << registration_id; pref_service_->SetString(prefs::kCryptAuthGCMRegistrationId, registration_id); for (auto& observer : observers_) observer.OnGCMRegistrationResult(true); diff --git a/components/cryptauth/device_to_device_authenticator.cc b/components/cryptauth/device_to_device_authenticator.cc index b218db040f0b51..176be0d98b3e0b 100644 --- a/components/cryptauth/device_to_device_authenticator.cc +++ b/components/cryptauth/device_to_device_authenticator.cc @@ -134,7 +134,7 @@ void DeviceToDeviceAuthenticator::OnHelloMessageCreated( return; } - PA_LOG(INFO) << "Sending [Initiator Hello] message."; + PA_LOG(VERBOSE) << "Sending [Initiator Hello] message."; // Add a timeout for receiving the [Responder Auth] message as a guard. timer_ = CreateTimer(); @@ -163,8 +163,8 @@ void DeviceToDeviceAuthenticator::OnResponderAuthValidated( return; } - PA_LOG(INFO) << "Successfully validated [Responder Auth]! " - << "Sending [Initiator Auth]..."; + PA_LOG(VERBOSE) << "Successfully validated [Responder Auth]! " + << "Sending [Initiator Auth]..."; state_ = State::VALIDATED_RESPONDER_AUTH; session_keys_ = session_keys; @@ -208,7 +208,7 @@ void DeviceToDeviceAuthenticator::Succeed() { DCHECK(state_ == State::SENT_INITIATOR_AUTH); DCHECK(!session_keys_.initiator_encode_key().empty()); DCHECK(!session_keys_.responder_encode_key().empty()); - PA_LOG(INFO) << "Authentication succeeded!"; + PA_LOG(VERBOSE) << "Authentication succeeded!"; state_ = State::AUTHENTICATION_SUCCESS; connection_->RemoveObserver(this); @@ -235,8 +235,8 @@ void DeviceToDeviceAuthenticator::OnMessageReceived( const WireMessage& message) { if (state_ == State::SENT_HELLO && message.feature() == std::string(Authenticator::kAuthenticationFeature)) { - PA_LOG(INFO) << "Received [Responder Auth] message, payload_size=" - << message.payload().size(); + PA_LOG(VERBOSE) << "Received [Responder Auth] message, payload_size=" + << message.payload().size(); state_ = State::RECEIVED_RESPONDER_AUTH; timer_.reset(); responder_auth_message_ = message.payload(); diff --git a/components/cryptauth/device_to_device_initiator_helper.cc b/components/cryptauth/device_to_device_initiator_helper.cc index 3cb479c3935752..ad9ff7b62a0f35 100644 --- a/components/cryptauth/device_to_device_initiator_helper.cc +++ b/components/cryptauth/device_to_device_initiator_helper.cc @@ -163,7 +163,7 @@ void DeviceToDeviceInitiatorHelper::OnInnerMessageCreatedForInitiatorAuth( const DeviceToDeviceInitiatorHelper::MessageCallback& callback, const std::string& inner_message) { if (inner_message.empty()) { - PA_LOG(INFO) << "Failed to create inner message for [Initiator Auth]."; + PA_LOG(VERBOSE) << "Failed to create inner message for [Initiator Auth]."; callback.Run(std::string()); return; } @@ -217,8 +217,8 @@ void DeviceToDeviceInitiatorHelper::BeginResponderAuthValidation( if (!responder_hello.ParseFromString(header.decryption_key_id()) || !responder_hello.public_dh_key().SerializeToString( &context.responder_session_public_key)) { - PA_LOG(INFO) << "Failed to extract responder session public key in " - << "[Responder Auth] header."; + PA_LOG(VERBOSE) << "Failed to extract responder session public key in " + << "[Responder Auth] header."; context.callback.Run(false, SessionKeys()); return; } @@ -253,7 +253,7 @@ void DeviceToDeviceInitiatorHelper::OnOuterMessageUnwrappedForResponderAuth( const std::string& payload, const securemessage::Header& header) { if (!verified) { - PA_LOG(INFO) << "Failed to unwrap outer [Responder Auth] message."; + PA_LOG(VERBOSE) << "Failed to unwrap outer [Responder Auth] message."; context.callback.Run(false, SessionKeys()); return; } @@ -262,7 +262,7 @@ void DeviceToDeviceInitiatorHelper::OnOuterMessageUnwrappedForResponderAuth( securemessage::DeviceToDeviceMessage device_to_device_message; if (!device_to_device_message.ParseFromString(payload) || device_to_device_message.sequence_number() != 1) { - PA_LOG(INFO) << "Failed to validate DeviceToDeviceMessage payload."; + PA_LOG(VERBOSE) << "Failed to validate DeviceToDeviceMessage payload."; context.callback.Run(false, SessionKeys()); return; } @@ -287,7 +287,7 @@ void DeviceToDeviceInitiatorHelper::OnMiddleMessageUnwrappedForResponderAuth( const std::string& payload, const securemessage::Header& header) { if (!verified) { - PA_LOG(INFO) << "Failed to unwrap middle [Responder Auth] message."; + PA_LOG(VERBOSE) << "Failed to unwrap middle [Responder Auth] message."; context.callback.Run(false, SessionKeys()); return; } @@ -312,7 +312,7 @@ void DeviceToDeviceInitiatorHelper::OnInnerMessageUnwrappedForResponderAuth( const std::string& payload, const securemessage::Header& header) { if (!verified) - PA_LOG(INFO) << "Failed to unwrap inner [Responder Auth] message."; + PA_LOG(VERBOSE) << "Failed to unwrap inner [Responder Auth] message."; // Note: The GMS Core implementation does not properly set the metadata // version, so we only check that the type is UNLOCK_KEY_SIGNED_CHALLENGE. diff --git a/components/cryptauth/device_to_device_responder_operations.cc b/components/cryptauth/device_to_device_responder_operations.cc index 78ae0bd781a59a..6a7096060139a5 100644 --- a/components/cryptauth/device_to_device_responder_operations.cc +++ b/components/cryptauth/device_to_device_responder_operations.cc @@ -80,7 +80,7 @@ void OnHelloMessageValidatedForResponderAuth( bool hello_message_validated, const std::string& hello_public_key) { if (!hello_message_validated) { - PA_LOG(INFO) << "Invalid [Hello] while creating [Responder Auth]"; + PA_LOG(VERBOSE) << "Invalid [Hello] while creating [Responder Auth]"; context.callback.Run(std::string()); return; } @@ -108,7 +108,7 @@ void OnInnerMessageCreatedForResponderAuth( CreateResponderAuthMessageContext context, const std::string& inner_message) { if (inner_message.empty()) { - PA_LOG(INFO) << "Failed to create middle message for [Responder Auth]"; + PA_LOG(VERBOSE) << "Failed to create middle message for [Responder Auth]"; context.callback.Run(std::string()); return; } @@ -201,7 +201,7 @@ void OnInnerMessageUnwrappedForInitiatorAuth( const std::string& payload, const securemessage::Header& header) { if (!verified) - PA_LOG(INFO) << "Failed to inner [Initiator Auth] message."; + PA_LOG(VERBOSE) << "Failed to inner [Initiator Auth] message."; context.callback.Run(verified); } @@ -212,7 +212,7 @@ void OnOuterMessageUnwrappedForInitiatorAuth( const std::string& payload, const securemessage::Header& header) { if (!verified) { - PA_LOG(INFO) << "Failed to verify outer [Initiator Auth] message"; + PA_LOG(VERBOSE) << "Failed to verify outer [Initiator Auth] message"; context.callback.Run(false); return; } @@ -221,7 +221,7 @@ void OnOuterMessageUnwrappedForInitiatorAuth( securemessage::DeviceToDeviceMessage device_to_device_message; if (!device_to_device_message.ParseFromString(payload) || device_to_device_message.sequence_number() != 1) { - PA_LOG(INFO) << "Failed to validate DeviceToDeviceMessage payload."; + PA_LOG(VERBOSE) << "Failed to validate DeviceToDeviceMessage payload."; context.callback.Run(false); return; } diff --git a/components/cryptauth/remote_device_loader.cc b/components/cryptauth/remote_device_loader.cc index d55ad601b68349..90f85ef6cc4bbe 100644 --- a/components/cryptauth/remote_device_loader.cc +++ b/components/cryptauth/remote_device_loader.cc @@ -94,8 +94,8 @@ RemoteDeviceLoader::~RemoteDeviceLoader() {} void RemoteDeviceLoader::Load(const RemoteDeviceCallback& callback) { DCHECK(callback_.is_null()); callback_ = callback; - PA_LOG(INFO) << "Loading " << remaining_devices_.size() - << " remote devices"; + PA_LOG(VERBOSE) << "Loading " << remaining_devices_.size() + << " remote devices"; if (remaining_devices_.empty()) { callback_.Run(remote_devices_); @@ -138,8 +138,8 @@ void RemoteDeviceLoader::OnPSKDerived( remote_devices_.push_back(remote_device); if (remaining_devices_.empty()) { - PA_LOG(INFO) << "Derived keys for " << remote_devices_.size() - << " devices."; + PA_LOG(VERBOSE) << "Derived keys for " << remote_devices_.size() + << " devices."; callback_.Run(remote_devices_); } } diff --git a/components/cryptauth/secure_channel.cc b/components/cryptauth/secure_channel.cc index 7135b0ecc62bb4..0ad3d0f06db0f9 100644 --- a/components/cryptauth/secure_channel.cc +++ b/components/cryptauth/secure_channel.cc @@ -288,11 +288,11 @@ void SecureChannel::OnMessageEncoded(const std::string& feature, void SecureChannel::OnMessageDecoded( const std::string& feature, const std::string& decoded_message) { - PA_LOG(INFO) << "Received message from " << connection_->GetDeviceAddress() - << ": {" - << "feature: \"" << feature << "\", " - << "payload: \"" << decoded_message << "\"" - << "}"; + PA_LOG(VERBOSE) << "Received message from " << connection_->GetDeviceAddress() + << ": {" + << "feature: \"" << feature << "\", " + << "payload: \"" << decoded_message << "\"" + << "}"; for (auto& observer : observer_list_) observer.OnMessageReceived(this, feature, decoded_message); diff --git a/components/cryptauth/sync_scheduler_impl.cc b/components/cryptauth/sync_scheduler_impl.cc index acd44a84dc9b1a..443b6a3edc7a35 100644 --- a/components/cryptauth/sync_scheduler_impl.cc +++ b/components/cryptauth/sync_scheduler_impl.cc @@ -102,10 +102,10 @@ SyncScheduler::SyncState SyncSchedulerImpl::GetSyncState() const { void SyncSchedulerImpl::OnTimerFired() { timer_.reset(); if (strategy_ == Strategy::PERIODIC_REFRESH) { - PA_LOG(INFO) << "Timer fired for periodic refresh, making request..."; + PA_LOG(VERBOSE) << "Timer fired for periodic refresh, making request..."; sync_state_ = SyncState::SYNC_IN_PROGRESS; } else if (strategy_ == Strategy::AGGRESSIVE_RECOVERY) { - PA_LOG(INFO) << "Timer fired for aggressive recovery, making request..."; + PA_LOG(VERBOSE) << "Timer fired for aggressive recovery, making request..."; sync_state_ = SyncState::SYNC_IN_PROGRESS; } else { NOTREACHED(); @@ -128,16 +128,17 @@ void SyncSchedulerImpl::ScheduleNextSync(const base::TimeDelta& sync_delta) { } bool is_aggressive_recovery = (strategy_ == Strategy::AGGRESSIVE_RECOVERY); - PA_LOG(INFO) << "Scheduling next sync for " << scheduler_name_ << ":\n" - << " Strategy: " << (is_aggressive_recovery - ? "Aggressive Recovery" - : "Periodic Refresh") << "\n" - << " Time Delta: " << TimeDeltaToString(sync_delta) - << (is_aggressive_recovery - ? base::StringPrintf( - "\n Previous Failures: %d", - base::saturated_cast(failure_count_)) - : ""); + PA_LOG(VERBOSE) << "Scheduling next sync for " << scheduler_name_ << ":\n" + << " Strategy: " + << (is_aggressive_recovery ? "Aggressive Recovery" + : "Periodic Refresh") + << "\n" + << " Time Delta: " << TimeDeltaToString(sync_delta) + << (is_aggressive_recovery + ? base::StringPrintf( + "\n Previous Failures: %d", + base::saturated_cast(failure_count_)) + : ""); timer_ = CreateTimer(); timer_->Start(FROM_HERE, sync_delta,