| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/shell/shell_resource_context.h" | 5 #include "content/shell/shell_resource_context.h" |
| 6 | 6 |
| 7 #include "content/browser/chrome_blob_storage_context.h" | 7 #include "content/browser/chrome_blob_storage_context.h" |
| 8 #include "content/browser/download/download_id_factory.h" |
| 8 #include "content/shell/shell_url_request_context_getter.h" | 9 #include "content/shell/shell_url_request_context_getter.h" |
| 9 | 10 |
| 10 namespace content { | 11 namespace content { |
| 11 | 12 |
| 12 ShellResourceContext::ShellResourceContext( | 13 ShellResourceContext::ShellResourceContext( |
| 13 ShellURLRequestContextGetter* getter, | 14 ShellURLRequestContextGetter* getter, |
| 14 ChromeBlobStorageContext* blob_storage_context, | 15 ChromeBlobStorageContext* blob_storage_context, |
| 15 DownloadManager::GetNextIdThunkType next_download_id_thunk) | 16 DownloadIdFactory* download_id_factory) |
| 16 : getter_(getter), | 17 : getter_(getter), |
| 17 blob_storage_context_(blob_storage_context), | 18 blob_storage_context_(blob_storage_context), |
| 18 next_download_id_thunk_(next_download_id_thunk) { | 19 download_id_factory_(download_id_factory) { |
| 19 } | 20 } |
| 20 | 21 |
| 21 ShellResourceContext::~ShellResourceContext() { | 22 ShellResourceContext::~ShellResourceContext() { |
| 22 } | 23 } |
| 23 | 24 |
| 24 void ShellResourceContext::EnsureInitialized() const { | 25 void ShellResourceContext::EnsureInitialized() const { |
| 25 const_cast<ShellResourceContext*>(this)->InitializeInternal(); | 26 const_cast<ShellResourceContext*>(this)->InitializeInternal(); |
| 26 } | 27 } |
| 27 | 28 |
| 28 void ShellResourceContext::InitializeInternal() { | 29 void ShellResourceContext::InitializeInternal() { |
| 29 set_request_context(getter_->GetURLRequestContext()); | 30 set_request_context(getter_->GetURLRequestContext()); |
| 30 set_host_resolver(getter_->host_resolver()); | 31 set_host_resolver(getter_->host_resolver()); |
| 31 set_blob_storage_context(blob_storage_context_); | 32 set_blob_storage_context(blob_storage_context_); |
| 32 set_next_download_id_thunk(next_download_id_thunk_); | 33 set_download_id_factory(download_id_factory_); |
| 33 } | 34 } |
| 34 | 35 |
| 35 } // namespace content | 36 } // namespace content |
| OLD | NEW |