Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: chrome/browser/conflicts/module_inspector_win.h

Issue 2916663002: Pass the path mapping via RefCountedData in ModuleInspector (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/conflicts/module_inspector_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/conflicts/module_inspector_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698