Chromium Code Reviews| Index: chrome/browser/conflicts/module_database_win.h |
| diff --git a/chrome/browser/conflicts/module_database_win.h b/chrome/browser/conflicts/module_database_win.h |
| index 025d54f8d5433776817a54fbc27297eb7fbc48b1..46a8c346e9114de1c0599e07c9cf8b0f6b949f42 100644 |
| --- a/chrome/browser/conflicts/module_database_win.h |
| +++ b/chrome/browser/conflicts/module_database_win.h |
| @@ -16,6 +16,10 @@ |
| // A class that keeps track of all modules loaded across Chrome processes. |
| // Drives the chrome://conflicts UI. |
| +// |
| +// This is effectively a singleton, but doesn't use base::Singleton. The intent |
| +// is for the object to be created when Chrome is single-threaded, and for it |
| +// be set as the process-wide singleton via SetInstance. |
| class ModuleDatabase { |
| public: |
| // A ModuleDatabase is by default bound to a provided sequenced task runner. |
| @@ -25,6 +29,11 @@ class ModuleDatabase { |
| explicit ModuleDatabase(scoped_refptr<base::SequencedTaskRunner> task_runner); |
| ~ModuleDatabase(); |
| + // Retrieves the singleton global instance of the ModuleDatabase. |
| + static ModuleDatabase* GetInstance(); |
| + // Sets the global instance of the ModuleDatabase. |
|
grt (UTC plus 2)
2017/01/06 09:44:58
nit: blank line before comment
chrisha
2017/01/10 21:01:46
Done.
|
| + static void SetInstance(std::unique_ptr<ModuleDatabase> module_database); |
| + |
| // Indicates that process with the given type has started. This must be called |
| // before any calls to OnModuleEvent or OnModuleUnload. Must be called in the |
| // same sequence as |task_runner_|. |