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 <shellapi.h> | 7 #include <shellapi.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 SetupInstallerUtilStrings(); | 283 SetupInstallerUtilStrings(); |
284 | 284 |
285 ChromeBrowserMainParts::PreMainMessageLoopStart(); | 285 ChromeBrowserMainParts::PreMainMessageLoopStart(); |
286 if (!parameters().ui_task) { | 286 if (!parameters().ui_task) { |
287 // Make sure that we know how to handle exceptions from the message loop. | 287 // Make sure that we know how to handle exceptions from the message loop. |
288 InitializeWindowProcExceptions(); | 288 InitializeWindowProcExceptions(); |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
292 int ChromeBrowserMainPartsWin::PreCreateThreads() { | 292 int ChromeBrowserMainPartsWin::PreCreateThreads() { |
293 // Record whether the machine is domain joined in a crash key. This will be used | 293 // Record whether the machine is domain joined in a crash key. This will be |
294 // to better identify whether crashes are from enterprise users. | 294 // used to better identify whether crashes are from enterprise users. |
295 base::debug::SetCrashKeyValue(crash_keys::kEnrolledToDomain, | 295 base::debug::SetCrashKeyValue(crash_keys::kEnrolledToDomain, |
296 base::win::IsEnrolledToDomain() ? "yes" : "no"); | 296 base::win::IsEnterpriseUser() ? "yes" : "no"); |
297 | 297 |
298 int rv = ChromeBrowserMainParts::PreCreateThreads(); | 298 int rv = ChromeBrowserMainParts::PreCreateThreads(); |
299 | 299 |
300 // TODO(viettrungluu): why don't we run this earlier? | 300 // TODO(viettrungluu): why don't we run this earlier? |
301 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && | 301 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && |
302 base::win::GetVersion() < base::win::VERSION_XP) { | 302 base::win::GetVersion() < base::win::VERSION_XP) { |
303 chrome::ShowWarningMessageBox( | 303 chrome::ShowWarningMessageBox( |
304 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), | 304 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), |
305 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP)); | 305 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP)); |
306 } | 306 } |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 if (resource_id) | 525 if (resource_id) |
526 return l10n_util::GetStringUTF16(resource_id); | 526 return l10n_util::GetStringUTF16(resource_id); |
527 return base::string16(); | 527 return base::string16(); |
528 } | 528 } |
529 | 529 |
530 // static | 530 // static |
531 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 531 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
532 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 532 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
533 installer::SetTranslationDelegate(&delegate); | 533 installer::SetTranslationDelegate(&delegate); |
534 } | 534 } |
OLD | NEW |