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 "content/browser/resource_context_impl.h" | 5 #include "content/browser/resource_context_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/appcache/chrome_appcache_service.h" | 8 #include "content/browser/appcache/chrome_appcache_service.h" |
9 #include "content/browser/fileapi/browser_file_system_helper.h" | 9 #include "content/browser/fileapi/browser_file_system_helper.h" |
10 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 10 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 // This object is owned by the BrowserContext and not ResourceContext, so | 271 // This object is owned by the BrowserContext and not ResourceContext, so |
272 // store a non-owning pointer here. | 272 // store a non-owning pointer here. |
273 resource_context->SetUserData( | 273 resource_context->SetUserData( |
274 kHostZoomMapKeyName, | 274 kHostZoomMapKeyName, |
275 new NonOwningZoomData( | 275 new NonOwningZoomData( |
276 HostZoomMap::GetForBrowserContext(browser_context))); | 276 HostZoomMap::GetForBrowserContext(browser_context))); |
277 | 277 |
278 // Add content's URLRequestContext's hooks. | 278 // Add content's URLRequestContext's hooks. |
279 // Check first to avoid memory leak in unittests. | 279 // Check first to avoid memory leak in unittests. |
| 280 // TODO(creis): Do equivalent initializations for isolated app and isolated |
| 281 // media request contexts. |
280 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { | 282 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { |
281 BrowserThread::PostTask( | 283 BrowserThread::PostTask( |
282 BrowserThread::IO, FROM_HERE, | 284 BrowserThread::IO, FROM_HERE, |
283 base::Bind(&InitializeRequestContext, | 285 base::Bind(&InitializeRequestContext, |
284 resource_context, | 286 resource_context, |
285 make_scoped_refptr(browser_context->GetRequestContext()))); | 287 make_scoped_refptr(browser_context->GetRequestContext()))); |
286 BrowserThread::PostTask( | 288 BrowserThread::PostTask( |
287 BrowserThread::IO, FROM_HERE, | 289 BrowserThread::IO, FROM_HERE, |
288 base::Bind(&InitializeRequestContext, | 290 base::Bind(&InitializeRequestContext, |
289 resource_context, | 291 resource_context, |
290 make_scoped_refptr( | 292 make_scoped_refptr( |
291 browser_context->GetRequestContextForMedia()))); | 293 browser_context->GetMediaRequestContext()))); |
292 } | 294 } |
293 } | 295 } |
294 | 296 |
295 } // namespace content | 297 } // namespace content |
OLD | NEW |