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

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

Issue 11885021: Don't derive from ChromeURLDataManager::DataSource, and instead have these classes implement a dele… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits Created 7 years, 11 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_backend.h
===================================================================
--- chrome/browser/ui/webui/chrome_url_data_manager_backend.h (revision 176443)
+++ chrome/browser/ui/webui/chrome_url_data_manager_backend.h (working copy)
@@ -44,7 +44,7 @@
ChromeURLDataManagerBackend* backend);
// Adds a DataSource to the collection of data sources.
- void AddDataSource(ChromeURLDataManager::DataSource* source);
+ void AddDataSource(URLDataSource* source);
// DataSource invokes this. Sends the data to the URLRequest.
void DataAvailable(RequestID request_id, base::RefCountedMemory* bytes);
@@ -56,13 +56,21 @@
friend class URLRequestChromeJob;
typedef std::map<std::string,
- scoped_refptr<ChromeURLDataManager::DataSource> > DataSourceMap;
+ scoped_refptr<URLDataSource> > DataSourceMap;
typedef std::map<RequestID, URLRequestChromeJob*> PendingRequestMap;
// Called by the job when it's starting up.
// Returns false if |url| is not a URL managed by this object.
bool StartRequest(const GURL& url, URLRequestChromeJob* job);
+ // Helper function to call StartDataRequest on |source|'s delegate. This is
+ // needed because while we want to call URLDataSourceDelegate's method, we
+ // need to add a refcount on the source.
+ static void CallStartRequest(scoped_refptr<URLDataSource> source,
+ const std::string& path,
+ bool is_incognito,
+ int request_id);
+
// Remove a request from the list of pending requests.
void RemoveRequest(URLRequestChromeJob* job);

Powered by Google App Engine
This is Rietveld 408576698