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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 6825038: Create a content::ResourceContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Oops, inverted the assertions. Created 9 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/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 7de91a077041ed0fa94848be3c8dea1a2b26d82a..4c400a3002c34bee6090e78dcfdbbbe65caa17a2 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -21,6 +21,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
+#include "content/browser/resource_context.h"
#include "net/ftp/ftp_network_layer.h"
#include "net/http/http_cache.h"
@@ -76,6 +77,13 @@ void ProfileImplIOData::Handle::Init(const FilePath& cookie_path,
io_data_->app_path_ = app_path;
}
+content::ResourceContextGetter*
+ProfileImplIOData::Handle::GetResourceContextGetter() const {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ LazyInitialize();
+ return new ProfileResourceContextGetter(io_data_);
+}
+
scoped_refptr<ChromeURLRequestContextGetter>
ProfileImplIOData::Handle::GetMainRequestContextGetter() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -296,6 +304,13 @@ void ProfileImplIOData::LazyInitializeInternal() const {
main_request_context_->set_ftp_transaction_factory(
new net::FtpNetworkLayer(io_thread_globals->host_resolver.get()));
+ // Initialize ResourceContext.
+
+ scoped_ptr<content::ResourceContext> resource_context(
+ new content::ResourceContext);
+ resource_context->set_database_tracker(profile_params.database_tracker);
+ set_resource_context(resource_context.release());
+
lazy_params_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698