| OLD | NEW | 
|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_CONFLICTS_MODULE_INSPECTOR_WIN_H_ | 5 #ifndef CHROME_BROWSER_CONFLICTS_MODULE_INSPECTOR_WIN_H_ | 
| 6 #define CHROME_BROWSER_CONFLICTS_MODULE_INSPECTOR_WIN_H_ | 6 #define CHROME_BROWSER_CONFLICTS_MODULE_INSPECTOR_WIN_H_ | 
| 7 | 7 | 
| 8 #include <memory> | 8 #include <memory> | 
| 9 #include <queue> | 9 #include <queue> | 
| 10 | 10 | 
| 11 #include "base/callback.h" | 11 #include "base/callback.h" | 
| 12 #include "base/macros.h" | 12 #include "base/macros.h" | 
|  | 13 #include "base/memory/ref_counted.h" | 
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" | 
| 14 #include "base/task_scheduler/task_traits.h" | 15 #include "base/task_scheduler/task_traits.h" | 
| 15 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" | 
| 16 #include "chrome/browser/conflicts/module_info_win.h" | 17 #include "chrome/browser/conflicts/module_info_win.h" | 
| 17 | 18 | 
| 18 // This class takes care of inspecting several modules (identified by their | 19 // This class takes care of inspecting several modules (identified by their | 
| 19 // ModuleInfoKey) and returning the result via the OnModuleInspectedCallback on | 20 // ModuleInfoKey) and returning the result via the OnModuleInspectedCallback on | 
| 20 // the SequencedTaskRunner where it was created. | 21 // the SequencedTaskRunner where it was created. | 
| 21 // | 22 // | 
| 22 // The inspection of all modules is quite expensive in terms of resources, so it | 23 // The inspection of all modules is quite expensive in terms of resources, so it | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 60   std::queue<ModuleInfoKey> queue_; | 61   std::queue<ModuleInfoKey> queue_; | 
| 61 | 62 | 
| 62   // The TaskPriority of the task that inspects the modules. It originally | 63   // The TaskPriority of the task that inspects the modules. It originally | 
| 63   // starts at BACKGROUND priority, but is changed to USER_VISIBLE when | 64   // starts at BACKGROUND priority, but is changed to USER_VISIBLE when | 
| 64   // IncreaseInspectionPriority() is called. | 65   // IncreaseInspectionPriority() is called. | 
| 65   base::TaskPriority inspection_task_priority_; | 66   base::TaskPriority inspection_task_priority_; | 
| 66 | 67 | 
| 67   // The vector of paths to %env_var%, used to account for differences in | 68   // The vector of paths to %env_var%, used to account for differences in | 
| 68   // localization and where people keep their files. | 69   // localization and where people keep their files. | 
| 69   // e.g. c:\windows vs d:\windows | 70   // e.g. c:\windows vs d:\windows | 
| 70   StringMapping path_mapping_; | 71   scoped_refptr<base::RefCountedData<StringMapping>> path_mapping_; | 
| 71 | 72 | 
| 72   base::ThreadChecker thread_checker_; | 73   base::ThreadChecker thread_checker_; | 
| 73 | 74 | 
| 74   // Weak pointers are used to safely post the inspection result back to the | 75   // Weak pointers are used to safely post the inspection result back to the | 
| 75   // ModuleInspector from the task scheduler. | 76   // ModuleInspector from the task scheduler. | 
| 76   base::WeakPtrFactory<ModuleInspector> weak_ptr_factory_; | 77   base::WeakPtrFactory<ModuleInspector> weak_ptr_factory_; | 
| 77 | 78 | 
| 78   DISALLOW_COPY_AND_ASSIGN(ModuleInspector); | 79   DISALLOW_COPY_AND_ASSIGN(ModuleInspector); | 
| 79 }; | 80 }; | 
| 80 | 81 | 
| 81 #endif  // CHROME_BROWSER_CONFLICTS_MODULE_INSPECTOR_WIN_H_ | 82 #endif  // CHROME_BROWSER_CONFLICTS_MODULE_INSPECTOR_WIN_H_ | 
| OLD | NEW | 
|---|