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

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

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/profiles/off_the_record_profile_io_data.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index 30f9f2cb0c0d61967e997c72e402bf55d3ab1860..2995816c550fc0b8ea3af74c96694d70d84679b5 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/profiles/off_the_record_profile_io_data.h"
+#include "base/bind.h"
#include "base/logging.h"
#include "base/stl_util-inl.h"
#include "build/build_config.h"
@@ -12,6 +13,7 @@
#include "chrome/browser/net/chrome_net_log.h"
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/net/chrome_url_request_context.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -44,7 +46,17 @@ OffTheRecordProfileIOData::Handle::~Handle() {
iter->second->CleanupOnUIThread();
}
- io_data_->ShutdownOnUIThread();
+ io_data_->AddRef();
+ io_data_.release()->ShutdownOnUIThread();
+}
+
+base::Callback<ChromeURLDataManagerBackend*(void)>
+OffTheRecordProfileIOData::Handle::
+GetChromeURLDataManagerBackendGetter() const {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ LazyInitialize();
+ return base::Bind(&ProfileIOData::GetChromeURLDataManagerBackend,
+ base::Unretained(io_data_.get()));
}
const content::ResourceContext&

Powered by Google App Engine
This is Rietveld 408576698