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

Unified Diff: chrome/browser/ui/startup/bad_flags_prompt.cc

Issue 1955773002: Enable MD by default on Windows for Canary/Dev and local builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DISALLOW_IMPLICIT_CONSTRUCTORS Created 4 years, 7 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 | « chrome/browser/first_run/first_run.cc ('k') | ui/base/material_design/material_design_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/startup/bad_flags_prompt.cc
diff --git a/chrome/browser/ui/startup/bad_flags_prompt.cc b/chrome/browser/ui/startup/bad_flags_prompt.cc
index 51039e243cb2adaebd1fc087a7767dd4bd635437..c97fb22460488202b915d76d9efc7a98b02d8a17 100644
--- a/chrome/browser/ui/startup/bad_flags_prompt.cc
+++ b/chrome/browser/ui/startup/bad_flags_prompt.cc
@@ -125,17 +125,8 @@ void MaybeShowInvalidUserDataDirWarningDialog() {
startup_metric_utils::SetNonBrowserUIDisplayed();
- // Ensure the ResourceBundle is initialized for string resource access.
- bool cleanup_resource_bundle = false;
- if (!ResourceBundle::HasSharedInstance()) {
- cleanup_resource_bundle = true;
- std::string locale = l10n_util::GetApplicationLocale(std::string());
- const char kUserDataDirDialogFallbackLocale[] = "en-US";
- if (locale.empty())
- locale = kUserDataDirDialogFallbackLocale;
- ui::ResourceBundle::InitSharedInstanceWithLocale(
- locale, NULL, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
- }
+ // The ResourceBundle hasn't been loaded yet, but we need strings from it.
+ ResourceBundle::TemporaryLoader loader;
const base::string16& title =
l10n_util::GetStringUTF16(IDS_CANT_WRITE_USER_DIRECTORY_TITLE);
@@ -143,9 +134,6 @@ void MaybeShowInvalidUserDataDirWarningDialog() {
l10n_util::GetStringFUTF16(IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY,
user_data_dir.LossyDisplayName());
- if (cleanup_resource_bundle)
- ResourceBundle::CleanupSharedInstance();
-
// More complex dialogs cannot be shown before the earliest calls here.
ShowWarningMessageBox(NULL, title, message);
}
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | ui/base/material_design/material_design_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698