| Index: chrome/browser/ui/webui/chrome_url_data_manager.h
|
| diff --git a/chrome/browser/ui/webui/chrome_url_data_manager.h b/chrome/browser/ui/webui/chrome_url_data_manager.h
|
| index cdaa54e8c654768f762f8c71177d96f2208dce8d..79fb2ae415dbdaf286c16dd84b62b42d0fb84172 100644
|
| --- a/chrome/browser/ui/webui/chrome_url_data_manager.h
|
| +++ b/chrome/browser/ui/webui/chrome_url_data_manager.h
|
| @@ -13,9 +13,11 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/message_loop_helpers.h"
|
| #include "base/synchronization/lock.h"
|
| +#include "chrome/browser/profiles/profile_keyed_service.h"
|
|
|
| class ChromeURLDataManagerBackend;
|
| class MessageLoop;
|
| +class Profile;
|
| class RefCountedMemory;
|
|
|
| namespace base {
|
| @@ -27,7 +29,7 @@ class DictionaryValue;
|
| // with AddDataSource. DataSources must be added on the UI thread (they are also
|
| // deleted on the UI thread). Internally the DataSources are maintained by
|
| // ChromeURLDataManagerBackend, see it for details.
|
| -class ChromeURLDataManager {
|
| +class ChromeURLDataManager : public ProfileKeyedService {
|
| public:
|
| class DataSource;
|
|
|
| @@ -142,7 +144,7 @@ class ChromeURLDataManager {
|
|
|
| explicit ChromeURLDataManager(
|
| const base::Callback<ChromeURLDataManagerBackend*(void)>& backend);
|
| - ~ChromeURLDataManager();
|
| + virtual ~ChromeURLDataManager();
|
|
|
| // Adds a DataSource to the collection of data sources. This *must* be invoked
|
| // on the UI thread.
|
| @@ -160,6 +162,10 @@ class ChromeURLDataManager {
|
| // for you, but can be invoked to force deletion (such as during shutdown).
|
| static void DeleteDataSources();
|
|
|
| + // Convenience wrapper function to add |source| to |profile|'s
|
| + // |ChromeURLDataManager|.
|
| + static void AddDataSource(Profile* profile, DataSource* source);
|
| +
|
| private:
|
| typedef std::vector<const ChromeURLDataManager::DataSource*> DataSources;
|
|
|
|
|