Chromium Code Reviews| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 // installer_util references strings that are normally compiled into | 204 // installer_util references strings that are normally compiled into |
| 205 // setup.exe. In Chrome, these strings are in the locale files. | 205 // setup.exe. In Chrome, these strings are in the locale files. |
| 206 SetupInstallerUtilStrings(); | 206 SetupInstallerUtilStrings(); |
| 207 | 207 |
| 208 ChromeBrowserMainParts::PreMainMessageLoopStart(); | 208 ChromeBrowserMainParts::PreMainMessageLoopStart(); |
| 209 if (!parameters().ui_task) { | 209 if (!parameters().ui_task) { |
| 210 // Make sure that we know how to handle exceptions from the message loop. | 210 // Make sure that we know how to handle exceptions from the message loop. |
| 211 InitializeWindowProcExceptions(); | 211 InitializeWindowProcExceptions(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 IncognitoModePrefs::InitializePlatformParentalControls(); | 214 // Initializes and caches the result on Windows. |
|
grt (UTC plus 2)
2015/03/03 20:28:54
nit:
// Prime the parental controls cache on Win
robliao
2015/03/03 21:07:12
Done.
| |
| 215 IncognitoModePrefs::ArePlatformParentalControlsEnabled(); | |
|
sky
2015/03/03 20:16:53
IMO the old name is clearer. I wouldn't expect a f
robliao
2015/03/03 20:20:34
We stuck with this as a compromise. It's either up
grt (UTC plus 2)
2015/03/03 20:28:54
Seconded. I think it's more clear to have separate
robliao
2015/03/03 21:07:12
Obviously I'm cool with the separation of requirem
| |
| 215 } | 216 } |
| 216 | 217 |
| 217 int ChromeBrowserMainPartsWin::PreCreateThreads() { | 218 int ChromeBrowserMainPartsWin::PreCreateThreads() { |
| 218 int rv = ChromeBrowserMainParts::PreCreateThreads(); | 219 int rv = ChromeBrowserMainParts::PreCreateThreads(); |
| 219 | 220 |
| 220 // TODO(viettrungluu): why don't we run this earlier? | 221 // TODO(viettrungluu): why don't we run this earlier? |
| 221 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && | 222 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && |
| 222 base::win::GetVersion() < base::win::VERSION_XP) { | 223 base::win::GetVersion() < base::win::VERSION_XP) { |
| 223 chrome::ShowMessageBox(NULL, | 224 chrome::ShowMessageBox(NULL, |
| 224 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), | 225 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 457 if (resource_id) | 458 if (resource_id) |
| 458 return l10n_util::GetStringUTF16(resource_id); | 459 return l10n_util::GetStringUTF16(resource_id); |
| 459 return base::string16(); | 460 return base::string16(); |
| 460 } | 461 } |
| 461 | 462 |
| 462 // static | 463 // static |
| 463 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 464 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 464 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 465 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 465 installer::SetTranslationDelegate(&delegate); | 466 installer::SetTranslationDelegate(&delegate); |
| 466 } | 467 } |
| OLD | NEW |