Commit 14fd37f0 authored by Shane Fitzpatrick's avatar Shane Fitzpatrick Committed by Chromium LUCI CQ

[Nearby] Remove profile user name from logs

Fixed: 1164114
Change-Id: I6e121d62052bf14126cd6e3cc3056cd83e1bd5e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617361Reviewed-by: default avatarJames Vecore <vecore@google.com>
Reviewed-by: default avatarJosh Nohle <nohle@chromium.org>
Commit-Queue: Shane Fitzpatrick <shanefitz@google.com>
Cr-Commit-Position: refs/heads/master@{#841662}
parent 76c102fc
......@@ -79,13 +79,11 @@ KeyedService* NearbySharingServiceFactory::BuildServiceInstanceFor(
if (!chromeos::ProfileHelper::IsPrimaryProfile(profile)) {
NS_LOG(VERBOSE)
<< __func__
<< ": Nearby Sharing service is skipping non-primary profile: "
<< profile->GetProfileUserName();
<< ": Nearby Sharing service is skipping non-primary profile";
return nullptr;
}
NS_LOG(VERBOSE) << __func__
<< "Nearby Sharing service is forcing active profile: "
<< profile->GetProfileUserName();
<< "Nearby Sharing service is forcing primary profile";
// Force active profile for ChromeOS for now.
process_manager.SetActiveProfile(profile);
#endif
......@@ -97,8 +95,8 @@ KeyedService* NearbySharingServiceFactory::BuildServiceInstanceFor(
auto nearby_connections_manager =
std::make_unique<NearbyConnectionsManagerImpl>(&process_manager, profile);
NS_LOG(VERBOSE) << __func__ << ": creating NearbySharingService for profile: "
<< profile->GetProfileUserName();
NS_LOG(VERBOSE) << __func__
<< ": creating NearbySharingService for primary profile";
return new NearbySharingServiceImpl(
pref_service, notification_display_service, profile,
......
......@@ -889,8 +889,7 @@ NearbySharingServiceImpl::GetCertificateManager() {
void NearbySharingServiceImpl::OnNearbyProfileChanged(Profile* profile) {
// TODO(crbug.com/1084576): Notify UI about the new active profile.
if (profile) {
NS_LOG(VERBOSE) << __func__ << ": Active Nearby profile changed to: "
<< profile->GetProfileUserName();
NS_LOG(VERBOSE) << __func__ << ": Active Nearby profile changed";
} else {
NS_LOG(VERBOSE) << __func__ << ": Active Nearby profile cleared";
}
......@@ -900,8 +899,8 @@ void NearbySharingServiceImpl::OnNearbyProfileChanged(Profile* profile) {
void NearbySharingServiceImpl::OnNearbyProcessStarted() {
DCHECK(profile_);
if (process_manager_->IsActiveProfile(profile_)) {
NS_LOG(VERBOSE) << __func__ << ": Nearby process started for profile: "
<< profile_->GetProfileUserName();
NS_LOG(VERBOSE) << __func__
<< ": Nearby process started for active profile";
}
}
......@@ -909,8 +908,8 @@ void NearbySharingServiceImpl::OnNearbyProcessStopped() {
DCHECK(profile_);
InvalidateSurfaceState();
if (process_manager_->IsActiveProfile(profile_)) {
NS_LOG(VERBOSE) << __func__ << ": Nearby process stopped for profile: "
<< profile_->GetProfileUserName();
NS_LOG(VERBOSE) << __func__
<< ": Nearby process stopped for active profile";
}
}
......@@ -1414,8 +1413,7 @@ void NearbySharingServiceImpl::InvalidateScanningState() {
if (!process_manager_->IsActiveProfile(profile_)) {
NS_LOG(VERBOSE) << __func__
<< ": Stopping discovery because profile was not active: "
<< profile_->GetProfileUserName();
<< ": Stopping discovery because profile was not active";
StopScanning();
return;
}
......@@ -1487,8 +1485,7 @@ void NearbySharingServiceImpl::InvalidateFastInitiationAdvertising() {
StopFastInitiationAdvertising();
NS_LOG(VERBOSE)
<< __func__
<< ": Stopping fast init advertising because profile was not active: "
<< profile_->GetProfileUserName();
<< ": Stopping fast init advertising because profile was not active";
return;
}
......@@ -1557,8 +1554,7 @@ void NearbySharingServiceImpl::InvalidateAdvertisingState() {
if (!process_manager_->IsActiveProfile(profile_)) {
NS_LOG(VERBOSE) << __func__
<< ": Stopping advertising because profile was not active: "
<< profile_->GetProfileUserName();
<< ": Stopping advertising because profile was not active";
StopAdvertising();
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment