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

Side by Side Diff: chrome/browser/ui/startup/bad_flags_prompt.cc

Issue 1988733002: Revert "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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/startup/bad_flags_prompt.h" 5 #include "chrome/browser/ui/startup/bad_flags_prompt.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 } 119 }
120 120
121 void MaybeShowInvalidUserDataDirWarningDialog() { 121 void MaybeShowInvalidUserDataDirWarningDialog() {
122 const base::FilePath& user_data_dir = GetInvalidSpecifiedUserDataDir(); 122 const base::FilePath& user_data_dir = GetInvalidSpecifiedUserDataDir();
123 if (user_data_dir.empty()) 123 if (user_data_dir.empty())
124 return; 124 return;
125 125
126 startup_metric_utils::SetNonBrowserUIDisplayed(); 126 startup_metric_utils::SetNonBrowserUIDisplayed();
127 127
128 // The ResourceBundle hasn't been loaded yet, but we need strings from it. 128 // Ensure the ResourceBundle is initialized for string resource access.
129 ResourceBundle::TemporaryLoader loader; 129 bool cleanup_resource_bundle = false;
130 if (!ResourceBundle::HasSharedInstance()) {
131 cleanup_resource_bundle = true;
132 std::string locale = l10n_util::GetApplicationLocale(std::string());
133 const char kUserDataDirDialogFallbackLocale[] = "en-US";
134 if (locale.empty())
135 locale = kUserDataDirDialogFallbackLocale;
136 ui::ResourceBundle::InitSharedInstanceWithLocale(
137 locale, NULL, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES);
138 }
130 139
131 const base::string16& title = 140 const base::string16& title =
132 l10n_util::GetStringUTF16(IDS_CANT_WRITE_USER_DIRECTORY_TITLE); 141 l10n_util::GetStringUTF16(IDS_CANT_WRITE_USER_DIRECTORY_TITLE);
133 const base::string16& message = 142 const base::string16& message =
134 l10n_util::GetStringFUTF16(IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY, 143 l10n_util::GetStringFUTF16(IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY,
135 user_data_dir.LossyDisplayName()); 144 user_data_dir.LossyDisplayName());
136 145
146 if (cleanup_resource_bundle)
147 ResourceBundle::CleanupSharedInstance();
148
137 // More complex dialogs cannot be shown before the earliest calls here. 149 // More complex dialogs cannot be shown before the earliest calls here.
138 ShowWarningMessageBox(NULL, title, message); 150 ShowWarningMessageBox(NULL, title, message);
139 } 151 }
140 152
141 } // namespace chrome 153 } // namespace chrome
OLDNEW
« 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