| 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/google/google_update_win.h" | 5 #include "chrome/browser/google/google_update_win.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 | 713 |
| 714 void UpdateCheckDriver::OnUpgradeError(GoogleUpdateErrorCode error_code, | 714 void UpdateCheckDriver::OnUpgradeError(GoogleUpdateErrorCode error_code, |
| 715 HRESULT hresult, | 715 HRESULT hresult, |
| 716 int installer_exit_code, | 716 int installer_exit_code, |
| 717 const base::string16& error_string) { | 717 const base::string16& error_string) { |
| 718 status_ = UPGRADE_ERROR; | 718 status_ = UPGRADE_ERROR; |
| 719 error_code_ = error_code; | 719 error_code_ = error_code; |
| 720 hresult_ = hresult; | 720 hresult_ = hresult; |
| 721 installer_exit_code_ = installer_exit_code; | 721 installer_exit_code_ = installer_exit_code; |
| 722 base::string16 error_msg = | 722 base::string16 error_msg = |
| 723 base::StringPrintf(L"%d: <a href='%s0x%X' target=_blank>0x%X</a>", | 723 base::StringPrintf(L"%d: <a href='%ls0x%X' target=_blank>0x%X</a>", |
| 724 error_code_, base::UTF8ToUTF16( | 724 error_code_, base::UTF8ToUTF16( |
| 725 chrome::kUpgradeHelpCenterBaseURL).c_str(), | 725 chrome::kUpgradeHelpCenterBaseURL).c_str(), |
| 726 hresult_, hresult_); | 726 hresult_, hresult_); |
| 727 if (installer_exit_code_ != -1) | 727 if (installer_exit_code_ != -1) |
| 728 error_msg += base::StringPrintf(L": %d", installer_exit_code_); | 728 error_msg += base::StringPrintf(L": %d", installer_exit_code_); |
| 729 if (system_level_install_) | 729 if (system_level_install_) |
| 730 error_msg += L" -- system level"; | 730 error_msg += L" -- system level"; |
| 731 if (error_string.empty()) { | 731 if (error_string.empty()) { |
| 732 error_message_ = l10n_util::GetStringFUTF16( | 732 error_message_ = l10n_util::GetStringFUTF16( |
| 733 IDS_ABOUT_BOX_ERROR_UPDATE_CHECK_FAILED, error_msg); | 733 IDS_ABOUT_BOX_ERROR_UPDATE_CHECK_FAILED, error_msg); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 760 const GoogleUpdate3ClassFactory& google_update_factory) { | 760 const GoogleUpdate3ClassFactory& google_update_factory) { |
| 761 if (g_google_update_factory) { | 761 if (g_google_update_factory) { |
| 762 delete g_google_update_factory; | 762 delete g_google_update_factory; |
| 763 g_google_update_factory = nullptr; | 763 g_google_update_factory = nullptr; |
| 764 } | 764 } |
| 765 if (!google_update_factory.is_null()) { | 765 if (!google_update_factory.is_null()) { |
| 766 g_google_update_factory = | 766 g_google_update_factory = |
| 767 new GoogleUpdate3ClassFactory(google_update_factory); | 767 new GoogleUpdate3ClassFactory(google_update_factory); |
| 768 } | 768 } |
| 769 } | 769 } |
| OLD | NEW |