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

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

Issue 1878943002: Revert of Makes MaterialDesignController initialization explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 // Ensure the ResourceBundle is initialized for string resource access. 128 // Ensure the ResourceBundle is initialized for string resource access.
129 bool cleanup_resource_bundle = false; 129 bool cleanup_resource_bundle = false;
130 if (!ResourceBundle::HasSharedInstance()) { 130 if (!ResourceBundle::HasSharedInstance()) {
131 cleanup_resource_bundle = true; 131 cleanup_resource_bundle = true;
132 std::string locale = l10n_util::GetApplicationLocale(std::string()); 132 std::string locale = l10n_util::GetApplicationLocale(std::string());
133 const char kUserDataDirDialogFallbackLocale[] = "en-US"; 133 const char kUserDataDirDialogFallbackLocale[] = "en-US";
134 if (locale.empty()) 134 if (locale.empty())
135 locale = kUserDataDirDialogFallbackLocale; 135 locale = kUserDataDirDialogFallbackLocale;
136 ui::ResourceBundle::InitSharedInstanceWithLocale( 136 ui::ResourceBundle::InitSharedInstanceWithLocale(
137 locale, NULL, ui::ResourceBundle::DO_NOT_LOAD_COMMON_RESOURCES); 137 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
138 } 138 }
139 139
140 const base::string16& title = 140 const base::string16& title =
141 l10n_util::GetStringUTF16(IDS_CANT_WRITE_USER_DIRECTORY_TITLE); 141 l10n_util::GetStringUTF16(IDS_CANT_WRITE_USER_DIRECTORY_TITLE);
142 const base::string16& message = 142 const base::string16& message =
143 l10n_util::GetStringFUTF16(IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY, 143 l10n_util::GetStringFUTF16(IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY,
144 user_data_dir.LossyDisplayName()); 144 user_data_dir.LossyDisplayName());
145 145
146 if (cleanup_resource_bundle) 146 if (cleanup_resource_bundle)
147 ResourceBundle::CleanupSharedInstance(); 147 ResourceBundle::CleanupSharedInstance();
148 148
149 // More complex dialogs cannot be shown before the earliest calls here. 149 // More complex dialogs cannot be shown before the earliest calls here.
150 ShowWarningMessageBox(NULL, title, message); 150 ShowWarningMessageBox(NULL, title, message);
151 } 151 }
152 152
153 } // namespace chrome 153 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_ui.cc ('k') | chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698