Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes all media keys from logs #6678

Merged
merged 1 commit into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/brave_rewards/browser/rewards_service_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,7 @@ void RewardsServiceImpl::FetchFavIcon(

auto it = current_media_fetchers_.find(url);
if (it != current_media_fetchers_.end()) {
BLOG(1, "Already fetching favicon: " << url);
BLOG(1, "Already fetching favicon");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ void GitHub::SavePublisherInfo(

if (publisher_key.empty()) {
callback(ledger::type::Result::LEDGER_ERROR, nullptr);
BLOG(0, "Publisher key is missing for: " << media_key);
BLOG(0, "Publisher key is missing");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void Media::OnMediaActivityError(ledger::type::VisitDataPtr visit_data,
}

if (url.empty()) {
BLOG(0, "Media activity error for url: " << visit_data->url);
BLOG(0, "Media activity error");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ void Reddit::SavePublisherInfo(
const std::string media_key = GetMediaKey(user_name, REDDIT_MEDIA_TYPE);
if (publisher_key.empty()) {
callback(ledger::type::Result::LEDGER_ERROR, nullptr);
BLOG(0, "Publisher key is missing for: " << media_key);
BLOG(0, "Publisher key is missing");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ void Twitch::OnMediaActivityError(const ledger::type::VisitData& visit_data,
ledger_->publisher()->GetPublisherActivityFromUrl(
window_id, ledger::type::VisitData::New(new_visit_data), std::string());
} else {
BLOG(0, "Media activity error for " << TWITCH_MEDIA_TYPE << " (name: "
<< name << ", url: " << visit_data.url << ")");
BLOG(0, "Media activity error");
}
}

Expand Down Expand Up @@ -618,7 +617,7 @@ void Twitch::SavePublisherInfo(const uint64_t duration,
const std::string& channel_id,
const std::string& publisher_key) {
if (channel_id.empty() && publisher_key.empty()) {
BLOG(0, "author id is missing for: " << media_key);
BLOG(0, "author id is missing");
return;
}

Expand All @@ -628,7 +627,7 @@ void Twitch::SavePublisherInfo(const uint64_t duration,
}

if (key.empty()) {
BLOG(0, "Publisher id is missing for: " << media_key);
BLOG(0, "Publisher id is missing");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void Twitter::SavePublisherInfo(

if (publisher_key.empty()) {
callback(ledger::type::Result::LEDGER_ERROR, nullptr);
BLOG(0, "Publisher key is missing for: " << media_key);
BLOG(0, "Publisher key is missing");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ void Vimeo::SavePublisherInfo(
const std::string& publisher_favicon) {
if (user_id.empty() && publisher_key.empty()) {
OnMediaActivityError(window_id);
BLOG(0, "User id is missing for: " << media_key);
BLOG(0, "User id is missing");
return;
}

Expand All @@ -653,7 +653,7 @@ void Vimeo::SavePublisherInfo(

if (key.empty()) {
OnMediaActivityError(window_id);
BLOG(0, "Publisher key is missing for: " << media_key);
BLOG(0, "Publisher key is missing");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ void YouTube::OnMediaActivityError(const ledger::type::VisitData& visit_data,
ledger_->publisher()->GetPublisherActivityFromUrl(
window_id, ledger::type::VisitData::New(new_visit_data), std::string());
} else {
BLOG(0, "Media activity error for " << YOUTUBE_MEDIA_TYPE << " (name: "
<< name << ", url: " << visit_data.url << ")");
BLOG(0, "Media activity error");
}
}

Expand Down Expand Up @@ -537,15 +536,15 @@ void YouTube::SavePublisherInfo(const uint64_t duration,
const std::string& channel_id) {
std::string url;
if (channel_id.empty()) {
BLOG(0, "Channel id is missing for: " << media_key);
BLOG(0, "Channel id is missing");
return;
}

std::string publisher_id = GetPublisherKey(channel_id);
url = publisher_url + "/videos";

if (publisher_id.empty()) {
BLOG(0, "Publisher id is missing for: " << media_key);
BLOG(0, "Publisher id is missing");
return;
}

Expand Down