| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ | 5 #ifndef CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ |
| 6 #define CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ | 6 #define CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // | 211 // |
| 212 // To use this class, grab the singleton pointer and call ScanNow(). | 212 // To use this class, grab the singleton pointer and call ScanNow(). |
| 213 // Then wait to get notified through MODULE_LIST_ENUMERATED when the list is | 213 // Then wait to get notified through MODULE_LIST_ENUMERATED when the list is |
| 214 // ready. | 214 // ready. |
| 215 // | 215 // |
| 216 // This class can be used on the UI thread as it asynchronously offloads the | 216 // This class can be used on the UI thread as it asynchronously offloads the |
| 217 // file work over to the FILE thread and reports back to the caller with a | 217 // file work over to the FILE thread and reports back to the caller with a |
| 218 // notification. | 218 // notification. |
| 219 class EnumerateModulesModel { | 219 class EnumerateModulesModel { |
| 220 public: | 220 public: |
| 221 static EnumerateModulesModel* GetSingleton() { | 221 static EnumerateModulesModel* GetInstance(); |
| 222 return Singleton<EnumerateModulesModel>::get(); | |
| 223 } | |
| 224 | 222 |
| 225 // Returns the number of suspected bad modules found in the last scan. | 223 // Returns the number of suspected bad modules found in the last scan. |
| 226 // Returns 0 if no scan has taken place yet. | 224 // Returns 0 if no scan has taken place yet. |
| 227 int suspected_bad_modules_detected() { | 225 int suspected_bad_modules_detected() { |
| 228 return suspected_bad_modules_detected_; | 226 return suspected_bad_modules_detected_; |
| 229 } | 227 } |
| 230 | 228 |
| 231 // Returns the number of confirmed bad modules found in the last scan. | 229 // Returns the number of confirmed bad modules found in the last scan. |
| 232 // Returns 0 if no scan has taken place yet. | 230 // Returns 0 if no scan has taken place yet. |
| 233 int confirmed_bad_modules_detected() { | 231 int confirmed_bad_modules_detected() { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 int confirmed_bad_modules_detected_; | 273 int confirmed_bad_modules_detected_; |
| 276 | 274 |
| 277 // The number of suspected bad modules (not including confirmed bad ones) | 275 // The number of suspected bad modules (not including confirmed bad ones) |
| 278 // found during last scan. | 276 // found during last scan. |
| 279 int suspected_bad_modules_detected_; | 277 int suspected_bad_modules_detected_; |
| 280 | 278 |
| 281 DISALLOW_COPY_AND_ASSIGN(EnumerateModulesModel); | 279 DISALLOW_COPY_AND_ASSIGN(EnumerateModulesModel); |
| 282 }; | 280 }; |
| 283 | 281 |
| 284 #endif // CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ | 282 #endif // CHROME_BROWSER_ENUMERATE_MODULES_MODEL_WIN_H_ |
| OLD | NEW |