Chromium Code Reviews

Side by Side Diff: chrome/browser/browser_main_win.cc

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_browsertest.cc ('k') | chrome/browser/browser_theme_provider_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/browser_main.h" 5 #include "chrome/browser/browser_main.h"
6 #include "chrome/browser/browser_main_win.h" 6 #include "chrome/browser/browser_main_win.h"
7 7
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 10
11 #include "app/l10n_util.h" 11 #include "app/l10n_util.h"
12 #include "app/message_box_flags.h" 12 #include "app/message_box_flags.h"
13 #include "app/win_util.h" 13 #include "app/win_util.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/i18n/rtl.h"
15 #include "base/path_service.h" 16 #include "base/path_service.h"
16 #include "base/win_util.h" 17 #include "base/win_util.h"
17 #include "chrome/browser/first_run.h" 18 #include "chrome/browser/first_run.h"
18 #include "chrome/browser/metrics/metrics_service.h" 19 #include "chrome/browser/metrics/metrics_service.h"
19 #include "chrome/browser/views/uninstall_view.h" 20 #include "chrome/browser/views/uninstall_view.h"
20 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
21 #include "chrome/common/env_vars.h" 22 #include "chrome/common/env_vars.h"
22 #include "chrome/common/result_codes.h" 23 #include "chrome/common/result_codes.h"
23 #include "chrome/installer/util/helper.h" 24 #include "chrome/installer/util/helper.h"
24 #include "chrome/installer/util/install_util.h" 25 #include "chrome/installer/util/install_util.h"
(...skipping 100 matching lines...)
125 return; 126 return;
126 127
127 // The encoding we use for the info is "title|context|direction" where 128 // The encoding we use for the info is "title|context|direction" where
128 // direction is either env_vars::kRtlLocale or env_vars::kLtrLocale depending 129 // direction is either env_vars::kRtlLocale or env_vars::kLtrLocale depending
129 // on the current locale. 130 // on the current locale.
130 std::wstring dlg_strings; 131 std::wstring dlg_strings;
131 dlg_strings.append(l10n_util::GetString(IDS_CRASH_RECOVERY_TITLE)); 132 dlg_strings.append(l10n_util::GetString(IDS_CRASH_RECOVERY_TITLE));
132 dlg_strings.append(L"|"); 133 dlg_strings.append(L"|");
133 dlg_strings.append(l10n_util::GetString(IDS_CRASH_RECOVERY_CONTENT)); 134 dlg_strings.append(l10n_util::GetString(IDS_CRASH_RECOVERY_CONTENT));
134 dlg_strings.append(L"|"); 135 dlg_strings.append(L"|");
135 if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) 136 if (base::i18n::IsRTL())
136 dlg_strings.append(env_vars::kRtlLocale); 137 dlg_strings.append(env_vars::kRtlLocale);
137 else 138 else
138 dlg_strings.append(env_vars::kLtrLocale); 139 dlg_strings.append(env_vars::kLtrLocale);
139 140
140 ::SetEnvironmentVariableW(env_vars::kRestartInfo, dlg_strings.c_str()); 141 ::SetEnvironmentVariableW(env_vars::kRestartInfo, dlg_strings.c_str());
141 } 142 }
142 143
143 // This method handles the --hide-icons and --show-icons command line options 144 // This method handles the --hide-icons and --show-icons command line options
144 // for chrome that get triggered by Windows from registry entries 145 // for chrome that get triggered by Windows from registry entries
145 // HideIconsCommand & ShowIconsCommand. Chrome doesn't support hide icons 146 // HideIconsCommand & ShowIconsCommand. Chrome doesn't support hide icons
(...skipping 58 matching lines...)
204 bool DoUpgradeTasks(const CommandLine& command_line) { 205 bool DoUpgradeTasks(const CommandLine& command_line) {
205 if (!Upgrade::SwapNewChromeExeIfPresent()) 206 if (!Upgrade::SwapNewChromeExeIfPresent())
206 return false; 207 return false;
207 // At this point the chrome.exe has been swapped with the new one. 208 // At this point the chrome.exe has been swapped with the new one.
208 if (!Upgrade::RelaunchChromeBrowser(command_line)) { 209 if (!Upgrade::RelaunchChromeBrowser(command_line)) {
209 // The re-launch fails. Feel free to panic now. 210 // The re-launch fails. Feel free to panic now.
210 NOTREACHED(); 211 NOTREACHED();
211 } 212 }
212 return true; 213 return true;
213 } 214 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_browsertest.cc ('k') | chrome/browser/browser_theme_provider_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine