-
Notifications
You must be signed in to change notification settings - Fork 900
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
Add strings for NavigationBar on relevant WebUI data sources directly #2384
Conversation
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.
How about opening an issue for removing this dependency from //ui
?
Dependency error is happened.
|
got the same error as above |
Created brave/brave-browser#4343 to track the problem |
154f678
to
90fcbcd
Compare
Updated with a completely different approach. Running tests now |
This fixes a layer-violation for dependencies where we were using a convenience function in the base //ui project in order to set the strings on all WebUI data sources. With this refactor, the dependencies are already in place from the chromium ui project (containing the webui data sources) to the brave webui project (containing the new navigation bar data provider). This new NavigationBarDataProvider is not much of a class, in that it only contains a single static function, but it follows the chromium practice of splitting data in to functional classes, and leaving it up to the provider as to whether it adds strings, functions or observers to the WebUI.
90fcbcd
to
f37ff3f
Compare
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 with nits 👍
void SetLoadTimeDataDefaults(const std::string& app_locale, | ||
base::DictionaryValue* localized_strings) { | ||
|
||
SetLoadTimeDataDefaults_ChromiumImpl(app_locale, localized_strings); | ||
#if !defined(OS_ANDROID) |
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.
This define pair can be removed
|
||
} // namespace | ||
|
||
#include "../../../../../chrome/browser/ui/webui/history_ui.cc" |
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.
lint?
|
||
} // namespace | ||
|
||
#include "../../../../../../chrome/browser/ui/webui/downloads/downloads_ui.cc" // NOLINT |
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.
lint fail by no last empty line?
"brToolbarDownloadsTitle", IDS_DOWNLOAD_TITLE); | ||
source->AddLocalizedString( | ||
"brToolbarHistoryTitle", IDS_HISTORY_TITLE); | ||
} |
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.
lint?
|
||
} // namespace | ||
|
||
#include "../../../../../../chrome/browser/ui/webui/bookmarks/bookmarks_ui.cc" |
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.
lint
Add strings for NavigationBar on relevant WebUI data sources directly --- Uplift of #2384 Fixes brave/brave-browser#4343
Add strings for NavigationBar on relevant WebUI data sources directly --- Uplift of #2384 Fixes brave/brave-browser#4343
Add strings for NavigationBar on relevant WebUI data sources directly --- Uplift of #2384 Fixes brave/brave-browser#4343
Add strings for NavigationBar on relevant WebUI data sources directly --- Uplift of #2384 Fixes brave/brave-browser#4343
Merge pull request #2384 from brave/fix-ui-generated-resources-dep
Merge pull request #2384 from brave/fix-ui-generated-resources-dep
This fixes an intermittent build error due to the generated_resources being included in web_ui_util (inside the //ui/base project)
This fixes a layer-violation for dependencies where we were using a convenience function in the base //ui project in order to set the strings on all WebUI data sources. With this refactor, the dependencies are already in place from the chromium ui project (containing the webui data sources) to the brave webui project (containing the new navigation bar data provider).
This new NavigationBarDataProvider is not much of a class, in that it only contains a single static function, but it follows the chromium practice of splitting data in to functional classes, and leaving it up to the provider as to whether it adds strings, functions or observers to the WebUI.
Fix brave/brave-browser#4343
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests && npm run test-security
) onnpm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.