-
Notifications
You must be signed in to change notification settings - Fork 883
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
Improve NTP Sponsored Images logs #26636
Conversation
VLOG(6) << "Cannot find valid component manifest file in: " | ||
<< installed_dir; | ||
return contents; | ||
} | ||
|
||
bool success = base::ReadFileToString(json_path, &contents); | ||
if (!success || contents.empty()) { | ||
DVLOG(2) << __func__ << ": cannot read json file " << json_path; | ||
VLOG(6) << "Cannot read component manifest file at: " << json_path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logs seem to generic, can we please mention "NTP Background Images"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this can be any of:
- NTP Background Images
- NTP Sponsored Images
- NTP Super Referral Images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So maybe, Cannot read NTP Images component manifest file at:
...
components/ntp_background_images/browser/ntp_background_images_service.cc
Outdated
Show resolved
Hide resolved
@@ -204,7 +204,7 @@ void NTPBackgroundImagesService::RegisterSponsoredImagesComponent() { | |||
} | |||
sponsored_images_component_id_ = data->component_id.data(); | |||
|
|||
DVLOG(2) << __func__ << ": Start NTP SI component"; | |||
VLOG(6) << "Register NTP Sposored Images component"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already log the same information in `RegisterBackgroundImagesComponent()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RegisterBackgroundImagesComponent
contains different log:
VLOG(6) << "Register NTP Background Images component";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling error: Sposored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
components/ntp_background_images/browser/ntp_background_images_service.cc
Outdated
Show resolved
Hide resolved
components/ntp_background_images/browser/ntp_background_images_service.cc
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (see comments)
Released in v1.75.36 |
Improve NTP Sponsored Images logs
Resolves brave/brave-browser#42372
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
No manual testing is required.