| 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/installer/util/google_update_settings.h" | 5 #include "chrome/installer/util/google_update_settings.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 RegKey clientstate; | 602 RegKey clientstate; |
| 603 if (clientstate.Open(root_key, clientstate_reg_path.c_str(), | 603 if (clientstate.Open(root_key, clientstate_reg_path.c_str(), |
| 604 KEY_QUERY_VALUE) == ERROR_SUCCESS) { | 604 KEY_QUERY_VALUE) == ERROR_SUCCESS) { |
| 605 string16 version; | 605 string16 version; |
| 606 DWORD dword_value; | 606 DWORD dword_value; |
| 607 if ((clientstate.ReadValueDW(google_update::kRegLastCheckSuccessField, | 607 if ((clientstate.ReadValueDW(google_update::kRegLastCheckSuccessField, |
| 608 &dword_value) == ERROR_SUCCESS) && | 608 &dword_value) == ERROR_SUCCESS) && |
| 609 (clientstate.ReadValue(google_update::kRegVersionField, | 609 (clientstate.ReadValue(google_update::kRegVersionField, |
| 610 &version) == ERROR_SUCCESS)) { | 610 &version) == ERROR_SUCCESS)) { |
| 611 product_found = true; | 611 product_found = true; |
| 612 data->version = WideToASCII(version); | 612 data->version = base::WideToASCII(version); |
| 613 data->last_success = base::Time::FromTimeT(dword_value); | 613 data->last_success = base::Time::FromTimeT(dword_value); |
| 614 data->last_result = 0; | 614 data->last_result = 0; |
| 615 data->last_error_code = 0; | 615 data->last_error_code = 0; |
| 616 data->last_extra_code = 0; | 616 data->last_extra_code = 0; |
| 617 | 617 |
| 618 if (clientstate.ReadValueDW(google_update::kRegLastInstallerResultField, | 618 if (clientstate.ReadValueDW(google_update::kRegLastInstallerResultField, |
| 619 &dword_value) == ERROR_SUCCESS) { | 619 &dword_value) == ERROR_SUCCESS) { |
| 620 // Google Update convention is that if an installer writes an result | 620 // Google Update convention is that if an installer writes an result |
| 621 // code that is invalid, it is clamped to an exit code result. | 621 // code that is invalid, it is clamped to an exit code result. |
| 622 const DWORD kMaxValidInstallResult = 4; // INSTALLER_RESULT_EXIT_CODE | 622 const DWORD kMaxValidInstallResult = 4; // INSTALLER_RESULT_EXIT_CODE |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 | 726 |
| 727 return base::StringPrintf(L"%ls, %02d %ls %d %02d:%02d:%02d GMT", | 727 return base::StringPrintf(L"%ls, %02d %ls %d %02d:%02d:%02d GMT", |
| 728 kDays[then.day_of_week], | 728 kDays[then.day_of_week], |
| 729 then.day_of_month, | 729 then.day_of_month, |
| 730 kMonths[then.month - 1], | 730 kMonths[then.month - 1], |
| 731 then.year, | 731 then.year, |
| 732 then.hour, | 732 then.hour, |
| 733 then.minute, | 733 then.minute, |
| 734 then.second); | 734 then.second); |
| 735 } | 735 } |
| OLD | NEW |