| 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 "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 } | 897 } |
| 898 | 898 |
| 899 EnumerateModulesModel::EnumerateModulesModel() | 899 EnumerateModulesModel::EnumerateModulesModel() |
| 900 : limited_mode_(false), | 900 : limited_mode_(false), |
| 901 scanning_(false), | 901 scanning_(false), |
| 902 conflict_notification_acknowledged_(false), | 902 conflict_notification_acknowledged_(false), |
| 903 confirmed_bad_modules_detected_(0), | 903 confirmed_bad_modules_detected_(0), |
| 904 suspected_bad_modules_detected_(0) { | 904 suspected_bad_modules_detected_(0) { |
| 905 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); | 905 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); |
| 906 if (cmd_line.HasSwitch(switches::kConflictingModulesCheck)) { | 906 if (cmd_line.HasSwitch(switches::kConflictingModulesCheck)) { |
| 907 check_modules_timer_.Start(FROM_HERE, | 907 check_modules_timer_.Start( |
| 908 base::TimeDelta::FromMilliseconds(kModuleCheckDelayMs), | 908 base::TimeDelta::FromMilliseconds(kModuleCheckDelayMs), |
| 909 this, &EnumerateModulesModel::ScanNow); | 909 this, &EnumerateModulesModel::ScanNow); |
| 910 } | 910 } |
| 911 | 911 |
| 912 lock = new base::Lock(); | 912 lock = new base::Lock(); |
| 913 } | 913 } |
| 914 | 914 |
| 915 EnumerateModulesModel::~EnumerateModulesModel() { | 915 EnumerateModulesModel::~EnumerateModulesModel() { |
| 916 delete lock; | 916 delete lock; |
| 917 } | 917 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 GenerateHash(WideToUTF8(module.name), &filename); | 968 GenerateHash(WideToUTF8(module.name), &filename); |
| 969 GenerateHash(WideToUTF8(module.location), &location); | 969 GenerateHash(WideToUTF8(module.location), &location); |
| 970 GenerateHash(WideToUTF8(module.description), &description); | 970 GenerateHash(WideToUTF8(module.description), &description); |
| 971 GenerateHash(WideToUTF8(module.digital_signer), &signer); | 971 GenerateHash(WideToUTF8(module.digital_signer), &signer); |
| 972 | 972 |
| 973 string16 url = l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, | 973 string16 url = l10n_util::GetStringFUTF16(IDS_HELP_CENTER_VIEW_CONFLICTS, |
| 974 ASCIIToUTF16(filename), ASCIIToUTF16(location), | 974 ASCIIToUTF16(filename), ASCIIToUTF16(location), |
| 975 ASCIIToUTF16(description), ASCIIToUTF16(signer)); | 975 ASCIIToUTF16(description), ASCIIToUTF16(signer)); |
| 976 return GURL(UTF16ToUTF8(url)); | 976 return GURL(UTF16ToUTF8(url)); |
| 977 } | 977 } |
| OLD | NEW |