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

Unified Diff: chrome/browser/ui/webui/chrome_url_data_manager.h

Issue 10196004: Changed ChromeURLDataManager to a ProfileKeyedService and made a Factory for it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added static convenience method to ChromeURLDataManager, fixed style issues Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
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..0df64f555a169c5eab94e4f868b830f0cc7c3341 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;
@@ -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);
Evan Stade 2012/04/24 21:22:14 star on the left
Kyle Horimoto 2012/04/24 22:17:49 Done.
+
private:
typedef std::vector<const ChromeURLDataManager::DataSource*> DataSources;

Powered by Google App Engine
This is Rietveld 408576698