OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 limited_mode_(false), | 810 limited_mode_(false), |
811 confirmed_bad_modules_detected_(0), | 811 confirmed_bad_modules_detected_(0), |
812 suspected_bad_modules_detected_(0) { | 812 suspected_bad_modules_detected_(0) { |
813 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); | 813 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); |
814 if (cmd_line.HasSwitch(switches::kConflictingModulesCheck)) { | 814 if (cmd_line.HasSwitch(switches::kConflictingModulesCheck)) { |
815 check_modules_timer_.Start( | 815 check_modules_timer_.Start( |
816 base::TimeDelta::FromMilliseconds(kModuleCheckDelayMs), | 816 base::TimeDelta::FromMilliseconds(kModuleCheckDelayMs), |
817 this, &EnumerateModulesModel::ScanNow); | 817 this, &EnumerateModulesModel::ScanNow); |
818 } | 818 } |
819 | 819 |
820 lock = new Lock(); | 820 lock = new base::Lock(); |
821 } | 821 } |
822 | 822 |
823 EnumerateModulesModel::~EnumerateModulesModel() { | 823 EnumerateModulesModel::~EnumerateModulesModel() { |
824 delete lock; | 824 delete lock; |
825 } | 825 } |
826 | 826 |
827 void EnumerateModulesModel::DoneScanning() { | 827 void EnumerateModulesModel::DoneScanning() { |
828 confirmed_bad_modules_detected_ = 0; | 828 confirmed_bad_modules_detected_ = 0; |
829 suspected_bad_modules_detected_ = 0; | 829 suspected_bad_modules_detected_ = 0; |
830 for (ModuleEnumerator::ModulesVector::const_iterator module = | 830 for (ModuleEnumerator::ModulesVector::const_iterator module = |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 GenerateHash(WideToUTF8(module.name), &filename); | 879 GenerateHash(WideToUTF8(module.name), &filename); |
880 GenerateHash(WideToUTF8(module.location), &location); | 880 GenerateHash(WideToUTF8(module.location), &location); |
881 GenerateHash(WideToUTF8(module.description), &description); | 881 GenerateHash(WideToUTF8(module.description), &description); |
882 GenerateHash(WideToUTF8(module.digital_signer), &signer); | 882 GenerateHash(WideToUTF8(module.digital_signer), &signer); |
883 | 883 |
884 string16 url = l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, | 884 string16 url = l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, |
885 ASCIIToUTF16(filename), ASCIIToUTF16(location), | 885 ASCIIToUTF16(filename), ASCIIToUTF16(location), |
886 ASCIIToUTF16(description), ASCIIToUTF16(signer)); | 886 ASCIIToUTF16(description), ASCIIToUTF16(signer)); |
887 return GURL(UTF16ToUTF8(url)); | 887 return GURL(UTF16ToUTF8(url)); |
888 } | 888 } |
OLD | NEW |