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