| OLD | NEW |
| 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/chrome_browser_main_win.h" | 5 #include "chrome/browser/chrome_browser_main_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 } | 215 } |
| 216 } | 216 } |
| 217 | 217 |
| 218 int ChromeBrowserMainPartsWin::PreCreateThreads() { | 218 int ChromeBrowserMainPartsWin::PreCreateThreads() { |
| 219 int rv = ChromeBrowserMainParts::PreCreateThreads(); | 219 int rv = ChromeBrowserMainParts::PreCreateThreads(); |
| 220 | 220 |
| 221 if (IsSafeModeStart()) { | 221 if (IsSafeModeStart()) { |
| 222 // TODO(cpu): disable other troublesome features for safe mode. | 222 // TODO(cpu): disable other troublesome features for safe mode. |
| 223 CommandLine::ForCurrentProcess()->AppendSwitch( | 223 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 224 switches::kDisableGpu); | 224 switches::kDisableGpu); |
| 225 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | |
| 226 switches::kHighDPISupport, "0"); | |
| 227 } | 225 } |
| 228 // TODO(viettrungluu): why don't we run this earlier? | 226 // TODO(viettrungluu): why don't we run this earlier? |
| 229 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && | 227 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && |
| 230 base::win::GetVersion() < base::win::VERSION_XP) { | 228 base::win::GetVersion() < base::win::VERSION_XP) { |
| 231 chrome::ShowMessageBox(NULL, | 229 chrome::ShowMessageBox(NULL, |
| 232 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), | 230 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), |
| 233 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP), | 231 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP), |
| 234 chrome::MESSAGE_BOX_TYPE_WARNING); | 232 chrome::MESSAGE_BOX_TYPE_WARNING); |
| 235 } | 233 } |
| 236 | 234 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 if (resource_id) | 438 if (resource_id) |
| 441 return l10n_util::GetStringUTF16(resource_id); | 439 return l10n_util::GetStringUTF16(resource_id); |
| 442 return base::string16(); | 440 return base::string16(); |
| 443 } | 441 } |
| 444 | 442 |
| 445 // static | 443 // static |
| 446 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 444 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 447 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 445 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 448 installer::SetTranslationDelegate(&delegate); | 446 installer::SetTranslationDelegate(&delegate); |
| 449 } | 447 } |
| OLD | NEW |