OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 main_job_factory_ = SetUpJobFactoryDefaults( | 269 main_job_factory_ = SetUpJobFactoryDefaults( |
270 main_job_factory.Pass(), | 270 main_job_factory.Pass(), |
271 request_interceptors.Pass(), | 271 request_interceptors.Pass(), |
272 profile_params->protocol_handler_interceptor.Pass(), | 272 profile_params->protocol_handler_interceptor.Pass(), |
273 network_delegate(), | 273 network_delegate(), |
274 ftp_factory_.get()); | 274 ftp_factory_.get()); |
275 main_context->set_job_factory(main_job_factory_.get()); | 275 main_context->set_job_factory(main_job_factory_.get()); |
276 | 276 |
277 // Setup the SDCHManager for this profile. | 277 // Setup the SDCHManager for this profile. |
278 sdch_manager_.reset(new net::SdchManager); | 278 sdch_manager_.reset(new net::SdchManager); |
279 | |
280 scoped_refptr<net::URLRequestContextGetter> getter( | |
281 new net::TrivialURLRequestContextGetter( | |
282 main_context, | |
283 content::BrowserThread::GetMessageLoopProxyForThread( | |
284 content::BrowserThread::IO))); | |
285 | |
286 sdch_manager_->set_sdch_fetcher(scoped_ptr<net::SdchFetcher>( | 279 sdch_manager_->set_sdch_fetcher(scoped_ptr<net::SdchFetcher>( |
287 new net::SdchDictionaryFetcher(sdch_manager_.get(), getter)).Pass()); | 280 new net::SdchDictionaryFetcher(sdch_manager_.get(), |
288 | 281 main_context)).Pass()); |
289 main_context->set_sdch_manager(sdch_manager_.get()); | 282 main_context->set_sdch_manager(sdch_manager_.get()); |
290 | 283 |
291 #if defined(ENABLE_EXTENSIONS) | 284 #if defined(ENABLE_EXTENSIONS) |
292 InitializeExtensionsRequestContext(profile_params); | 285 InitializeExtensionsRequestContext(profile_params); |
293 #endif | 286 #endif |
294 } | 287 } |
295 | 288 |
296 void OffTheRecordProfileIOData:: | 289 void OffTheRecordProfileIOData:: |
297 InitializeExtensionsRequestContext(ProfileParams* profile_params) const { | 290 InitializeExtensionsRequestContext(ProfileParams* profile_params) const { |
298 net::URLRequestContext* extensions_context = extensions_request_context(); | 291 net::URLRequestContext* extensions_context = extensions_request_context(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 return app_request_context; | 410 return app_request_context; |
418 } | 411 } |
419 | 412 |
420 net::URLRequestContext* | 413 net::URLRequestContext* |
421 OffTheRecordProfileIOData::AcquireIsolatedMediaRequestContext( | 414 OffTheRecordProfileIOData::AcquireIsolatedMediaRequestContext( |
422 net::URLRequestContext* app_context, | 415 net::URLRequestContext* app_context, |
423 const StoragePartitionDescriptor& partition_descriptor) const { | 416 const StoragePartitionDescriptor& partition_descriptor) const { |
424 NOTREACHED(); | 417 NOTREACHED(); |
425 return NULL; | 418 return NULL; |
426 } | 419 } |
OLD | NEW |