Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Unified Diff: ash/shell/content/client/shell_main_delegate.cc

Issue 2148363003: mash: Cleanup ash test strings and resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup patch Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/resources/BUILD.gn ('k') | ash/strings/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell/content/client/shell_main_delegate.cc
diff --git a/ash/shell/content/client/shell_main_delegate.cc b/ash/shell/content/client/shell_main_delegate.cc
index 4b4a21d4fe05d7b7793a9e84829137b6cd151ae9..e984b982aa6d7f48b975e8cecab4c3d9f5131e18 100644
--- a/ash/shell/content/client/shell_main_delegate.cc
+++ b/ash/shell/content/client/shell_main_delegate.cc
@@ -41,8 +41,7 @@ content::ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() {
}
void ShellMainDelegate::InitializeResourceBundle() {
- // Load ash resources and en-US strings; not 'common' (Chrome) resources.
- // TODO(msw): Check ResourceBundle::IsScaleFactorSupported; load 300% etc.
+ // Load ash resources and strings; not 'common' (Chrome) resources.
base::FilePath path;
PathService::Get(base::DIR_MODULE, &path);
base::FilePath ash_test_strings =
@@ -54,8 +53,10 @@ void ShellMainDelegate::InitializeResourceBundle() {
ui::ResourceBundle::InitSharedInstanceWithPakPath(ash_test_strings);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- rb.AddDataPackFromPath(ash_test_resources_100, ui::SCALE_FACTOR_100P);
- rb.AddDataPackFromPath(ash_test_resources_200, ui::SCALE_FACTOR_200P);
+ if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_100P))
+ rb.AddDataPackFromPath(ash_test_resources_100, ui::SCALE_FACTOR_100P);
+ if (ui::ResourceBundle::IsScaleFactorSupported(ui::SCALE_FACTOR_200P))
+ rb.AddDataPackFromPath(ash_test_resources_200, ui::SCALE_FACTOR_200P);
}
} // namespace shell
« no previous file with comments | « ash/resources/BUILD.gn ('k') | ash/strings/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698