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 <stdint.h> | 9 #include <stdint.h> |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 SetupInstallerUtilStrings(); | 305 SetupInstallerUtilStrings(); |
306 | 306 |
307 ChromeBrowserMainParts::PreMainMessageLoopStart(); | 307 ChromeBrowserMainParts::PreMainMessageLoopStart(); |
308 if (!parameters().ui_task) { | 308 if (!parameters().ui_task) { |
309 // Make sure that we know how to handle exceptions from the message loop. | 309 // Make sure that we know how to handle exceptions from the message loop. |
310 InitializeWindowProcExceptions(); | 310 InitializeWindowProcExceptions(); |
311 } | 311 } |
312 } | 312 } |
313 | 313 |
314 int ChromeBrowserMainPartsWin::PreCreateThreads() { | 314 int ChromeBrowserMainPartsWin::PreCreateThreads() { |
315 // Record whether the machine is domain joined in a crash key. This will be used | 315 // Record whether the machine is enterprise managed in a crash key. This will |
316 // to better identify whether crashes are from enterprise users. | 316 // be used to better identify whether crashes are from enterprise users. |
317 base::debug::SetCrashKeyValue(crash_keys::kEnrolledToDomain, | 317 base::debug::SetCrashKeyValue( |
318 base::win::IsEnrolledToDomain() ? "yes" : "no"); | 318 crash_keys::kIsEnterpriseManaged, |
| 319 base::win::IsEnterpriseManaged() ? "yes" : "no"); |
319 | 320 |
320 int rv = ChromeBrowserMainParts::PreCreateThreads(); | 321 int rv = ChromeBrowserMainParts::PreCreateThreads(); |
321 | 322 |
322 // TODO(viettrungluu): why don't we run this earlier? | 323 // TODO(viettrungluu): why don't we run this earlier? |
323 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && | 324 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && |
324 base::win::GetVersion() < base::win::VERSION_XP) { | 325 base::win::GetVersion() < base::win::VERSION_XP) { |
325 chrome::ShowWarningMessageBox( | 326 chrome::ShowWarningMessageBox( |
326 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), | 327 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), |
327 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP)); | 328 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP)); |
328 } | 329 } |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 if (resource_id) | 540 if (resource_id) |
540 return l10n_util::GetStringUTF16(resource_id); | 541 return l10n_util::GetStringUTF16(resource_id); |
541 return base::string16(); | 542 return base::string16(); |
542 } | 543 } |
543 | 544 |
544 // static | 545 // static |
545 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 546 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
546 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 547 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
547 installer::SetTranslationDelegate(&delegate); | 548 installer::SetTranslationDelegate(&delegate); |
548 } | 549 } |
OLD | NEW |