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/enumerate_modules_model_win.h" | 5 #include "chrome/browser/enumerate_modules_model_win.h" |
6 | 6 |
7 #include <Tlhelp32.h> | 7 #include <Tlhelp32.h> |
8 #include <wintrust.h> | 8 #include <wintrust.h> |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
888 data->SetString("digital_signer", module->digital_signer); | 888 data->SetString("digital_signer", module->digital_signer); |
889 | 889 |
890 if (!limited_mode_) { | 890 if (!limited_mode_) { |
891 // Figure out the possible resolution help string. | 891 // Figure out the possible resolution help string. |
892 base::string16 actions; | 892 base::string16 actions; |
893 base::string16 separator = base::ASCIIToWide(" ") + | 893 base::string16 separator = base::ASCIIToWide(" ") + |
894 l10n_util::GetStringUTF16( | 894 l10n_util::GetStringUTF16( |
895 IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_SEPARATOR) + | 895 IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_SEPARATOR) + |
896 base::ASCIIToWide(" "); | 896 base::ASCIIToWide(" "); |
897 | 897 |
898 if (module->recommended_action & ModuleEnumerator::NONE) { | 898 if (module->recommended_action == ModuleEnumerator::NONE) { |
Finnur
2014/11/04 17:10:15
No, you were right. Now that I'm a little fresher
| |
899 actions = l10n_util::GetStringUTF16( | 899 actions = l10n_util::GetStringUTF16( |
900 IDS_CONFLICTS_CHECK_INVESTIGATING); | 900 IDS_CONFLICTS_CHECK_INVESTIGATING); |
901 } | 901 } |
902 if (module->recommended_action & ModuleEnumerator::UNINSTALL) { | 902 if (module->recommended_action & ModuleEnumerator::UNINSTALL) { |
903 if (!actions.empty()) | 903 if (!actions.empty()) |
904 actions += separator; | 904 actions += separator; |
905 actions = l10n_util::GetStringUTF16( | 905 actions = l10n_util::GetStringUTF16( |
906 IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_UNINSTALL); | 906 IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_UNINSTALL); |
907 } | 907 } |
908 if (module->recommended_action & ModuleEnumerator::UPDATE) { | 908 if (module->recommended_action & ModuleEnumerator::UPDATE) { |
909 if (!actions.empty()) | 909 if (!actions.empty()) |
910 actions += separator; | 910 actions += separator; |
911 actions += l10n_util::GetStringUTF16( | 911 actions += l10n_util::GetStringUTF16( |
912 IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_UPDATE); | 912 IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_UPDATE); |
913 } | 913 } |
914 if (module->recommended_action & ModuleEnumerator::DISABLE) { | 914 if (module->recommended_action & ModuleEnumerator::DISABLE) { |
915 if (!actions.empty()) | 915 if (!actions.empty()) |
916 actions += separator; | 916 actions += separator; |
917 actions += l10n_util::GetStringUTF16( | 917 actions += l10n_util::GetStringUTF16( |
918 IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_DISABLE); | 918 IDS_CONFLICTS_CHECK_POSSIBLE_ACTION_DISABLE); |
919 } | 919 } |
Finnur
2014/11/04 17:10:15
I still think, for bonus points, everything from l
| |
920 base::string16 possible_resolution = | 920 base::string16 possible_resolution = |
921 actions.empty() ? base::ASCIIToWide("") | 921 actions.empty() ? base::ASCIIToWide("") |
922 : l10n_util::GetStringUTF16( | 922 : l10n_util::GetStringUTF16( |
923 IDS_CONFLICTS_CHECK_POSSIBLE_ACTIONS) + | 923 IDS_CONFLICTS_CHECK_POSSIBLE_ACTIONS) + |
924 base::ASCIIToWide(" ") + | 924 base::ASCIIToWide(" ") + |
925 actions; | 925 actions; |
926 data->SetString("possibleResolution", possible_resolution); | 926 data->SetString("possibleResolution", possible_resolution); |
927 data->SetString("help_url", | 927 data->SetString("help_url", |
928 ConstructHelpCenterUrl(*module).spec().c_str()); | 928 ConstructHelpCenterUrl(*module).spec().c_str()); |
929 } | 929 } |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1036 GenerateHash(base::WideToUTF8(module.location), &location); | 1036 GenerateHash(base::WideToUTF8(module.location), &location); |
1037 GenerateHash(base::WideToUTF8(module.description), &description); | 1037 GenerateHash(base::WideToUTF8(module.description), &description); |
1038 GenerateHash(base::WideToUTF8(module.digital_signer), &signer); | 1038 GenerateHash(base::WideToUTF8(module.digital_signer), &signer); |
1039 | 1039 |
1040 base::string16 url = | 1040 base::string16 url = |
1041 l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, | 1041 l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, |
1042 base::ASCIIToUTF16(filename), base::ASCIIToUTF16(location), | 1042 base::ASCIIToUTF16(filename), base::ASCIIToUTF16(location), |
1043 base::ASCIIToUTF16(description), base::ASCIIToUTF16(signer)); | 1043 base::ASCIIToUTF16(description), base::ASCIIToUTF16(signer)); |
1044 return GURL(base::UTF16ToUTF8(url)); | 1044 return GURL(base::UTF16ToUTF8(url)); |
1045 } | 1045 } |
OLD | NEW |