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

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

Issue 7282054: Remove more unnecessary ChromeURLRequestContext members. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright and chormeos tests. Created 9 years, 5 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 9bf894b4abb6a43becbc89d66495d37c2c23297a..7cff56a253c385043e2308fb907ad1f57efeeecf 100644
--- a/chrome/browser/ui/webui/chrome_url_data_manager.h
+++ b/chrome/browser/ui/webui/chrome_url_data_manager.h
@@ -8,6 +8,7 @@
#include <string>
+#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/task.h"
#include "content/browser/browser_thread.h"
@@ -140,7 +141,8 @@ class ChromeURLDataManager {
ChromeURLDataManagerBackend* backend_;
};
- explicit ChromeURLDataManager(Profile* profile);
+ explicit ChromeURLDataManager(
+ const base::Callback<ChromeURLDataManagerBackend*(void)>& backend);
~ChromeURLDataManager();
// Adds a DataSource to the collection of data sources. This *must* be invoked
@@ -171,7 +173,10 @@ class ChromeURLDataManager {
// was invoked).
static bool IsScheduledForDeletion(const DataSource* data_source);
- Profile* profile_;
+ // A callback that returns the ChromeURLDataManagerBackend. Only accessible on
+ // the IO thread. This is necessary because ChromeURLDataManager is created on
+ // the UI thread, but ChromeURLDataManagerBackend lives on the IO thread.
+ const base::Callback<ChromeURLDataManagerBackend*(void)> backend_;
// Lock used when accessing |data_sources_|.
static base::Lock delete_lock_;

Powered by Google App Engine
This is Rietveld 408576698