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

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

Issue 7384008: Revert 92668 - Remove more unnecessary ChromeURLRequestContext members. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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.cc
===================================================================
--- chrome/browser/ui/webui/chrome_url_data_manager.cc (revision 92669)
+++ chrome/browser/ui/webui/chrome_url_data_manager.cc (working copy)
@@ -8,7 +8,6 @@
#include "base/i18n/rtl.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/synchronization/lock.h"
@@ -32,15 +31,16 @@
// Invoked on the IO thread to do the actual adding of the DataSource.
static void AddDataSourceOnIOThread(
- const base::Callback<ChromeURLDataManagerBackend*(void)>& backend,
+ scoped_refptr<net::URLRequestContextGetter> context_getter,
scoped_refptr<ChromeURLDataManager::DataSource> data_source) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- backend.Run()->AddDataSource(data_source.get());
+ static_cast<ChromeURLRequestContext*>(
+ context_getter->GetURLRequestContext())->
+ chrome_url_data_manager_backend()->AddDataSource(data_source.get());
}
-ChromeURLDataManager::ChromeURLDataManager(
- const base::Callback<ChromeURLDataManagerBackend*(void)>& backend)
- : backend_(backend) {
+ChromeURLDataManager::ChromeURLDataManager(Profile* profile)
+ : profile_(profile) {
}
ChromeURLDataManager::~ChromeURLDataManager() {
@@ -51,7 +51,7 @@
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
NewRunnableFunction(AddDataSourceOnIOThread,
- backend_,
+ make_scoped_refptr(profile_->GetRequestContext()),
make_scoped_refptr(source)));
}
« no previous file with comments | « chrome/browser/ui/webui/chrome_url_data_manager.h ('k') | chrome/browser/ui/webui/chrome_url_data_manager_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698