| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 StoragePartitionImpl* partition, | 79 StoragePartitionImpl* partition, |
| 80 const FilePath& partition_path) { | 80 const FilePath& partition_path) { |
| 81 // Check first to avoid memory leak in unittests. | 81 // Check first to avoid memory leak in unittests. |
| 82 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { | 82 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { |
| 83 BrowserThread::PostTask( | 83 BrowserThread::PostTask( |
| 84 BrowserThread::IO, FROM_HERE, | 84 BrowserThread::IO, FROM_HERE, |
| 85 base::Bind(&ChromeAppCacheService::InitializeOnIOThread, | 85 base::Bind(&ChromeAppCacheService::InitializeOnIOThread, |
| 86 partition->GetAppCacheService(), | 86 partition->GetAppCacheService(), |
| 87 browser_context_->IsOffTheRecord() ? FilePath() : | 87 browser_context_->IsOffTheRecord() ? FilePath() : |
| 88 partition_path.Append(kAppCacheDirname), | 88 partition_path.Append(kAppCacheDirname), |
| 89 // TODO(michaeln): This is not right, appcache will be | 89 partition->GetResourceContext(), |
| 90 // using the cookies and cache of a the default | |
| 91 // partition when populating the cache. | |
| 92 // http://crbug.com/85121 | |
| 93 browser_context_->GetResourceContext(), | |
| 94 make_scoped_refptr( | 90 make_scoped_refptr( |
| 95 browser_context_->GetSpecialStoragePolicy()))); | 91 browser_context_->GetSpecialStoragePolicy()))); |
| 96 } | 92 } |
| 97 } | 93 } |
| 98 | 94 |
| 99 } // namespace content | 95 } // namespace content |
| OLD | NEW |