Chromium Code Reviews| 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/storage_partition_impl_map.h" | 5 #include "content/browser/storage_partition_impl_map.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 259 // Add content's URLRequestContext's hooks. | 259 // Add content's URLRequestContext's hooks. |
| 260 BrowserThread::PostTask( | 260 BrowserThread::PostTask( |
| 261 BrowserThread::IO, FROM_HERE, | 261 BrowserThread::IO, FROM_HERE, |
| 262 base::Bind( | 262 base::Bind( |
| 263 &InitializeURLRequestContext, | 263 &InitializeURLRequestContext, |
| 264 make_scoped_refptr(partition->GetURLRequestContext()), | 264 make_scoped_refptr(partition->GetURLRequestContext()), |
| 265 make_scoped_refptr(partition->GetAppCacheService()), | 265 make_scoped_refptr(partition->GetAppCacheService()), |
| 266 make_scoped_refptr(partition->GetFileSystemContext()), | 266 make_scoped_refptr(partition->GetFileSystemContext()), |
| 267 make_scoped_refptr( | 267 make_scoped_refptr( |
| 268 ChromeBlobStorageContext::GetFor(browser_context_)))); | 268 ChromeBlobStorageContext::GetFor(browser_context_)))); |
| 269 | 269 BrowserThread::PostTask( |
| 270 // We do not call InitializeURLRequestContext() for media contexts because, | 270 BrowserThread::IO, FROM_HERE, |
| 271 // other than the HTTP cache, the media contexts share the same backing | 271 base::Bind( |
| 272 // objects as their associated "normal" request context. Thus, the previous | 272 &InitializeURLRequestContext, |
|
Charlie Reis
2012/09/25 18:29:59
Can you explain why this fixes the bug? When Albe
Charlie Reis
2012/09/26 00:47:57
Nevermind, I looked closer and figured it out. Th
| |
| 273 // call serves to initialize the media request context for this storage | 273 make_scoped_refptr(partition->GetMediaURLRequestContext()), |
| 274 // partition as well. | 274 make_scoped_refptr(partition->GetAppCacheService()), |
| 275 make_scoped_refptr(partition->GetFileSystemContext()), | |
| 276 make_scoped_refptr( | |
| 277 ChromeBlobStorageContext::GetFor(browser_context_)))); | |
| 275 } | 278 } |
| 276 } | 279 } |
| 277 | 280 |
| 278 } // namespace content | 281 } // namespace content |
| OLD | NEW |