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 7527d6fa0f8794f766adbc2b2bbff90616eb942e..fa618974e0135fc73196256227273bd6da4c4a43 100644 |
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc |
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc |
@@ -270,15 +270,18 @@ void OffTheRecordProfileIOData::InitializeInternal( |
// Setup the SDCHManager for this profile. |
sdch_manager_.reset(new net::SdchManager); |
- sdch_manager_->set_sdch_fetcher( |
- new net::SdchDictionaryFetcher( |
- sdch_manager_.get(), |
- // SdchDictionaryFetcher takes a reference to the Getter, and |
- // hence implicitly takes ownership. |
- new net::TrivialURLRequestContextGetter( |
- main_context, |
- content::BrowserThread::GetMessageLoopProxyForThread( |
- content::BrowserThread::IO)))); |
+ |
+ net::URLRequestContextGetter* getter( |
+ new net::TrivialURLRequestContextGetter( |
+ main_context, |
+ content::BrowserThread::GetMessageLoopProxyForThread( |
+ content::BrowserThread::IO))); |
+ |
+ // SdchDictionaryFetcher takes a reference to the URLRequestContextGetter, |
+ // and hence implicitly takes ownership. |
+ sdch_manager_->set_sdch_fetcher(scoped_ptr<net::SdchFetcher>( |
+ new net::SdchDictionaryFetcher(sdch_manager_.get(), getter)).Pass()); |
+ |
main_context->set_sdch_manager(sdch_manager_.get()); |
#if defined(ENABLE_EXTENSIONS) |