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 |
| 90 // using the cookies and cache of a the default |
| 91 // partition when populating the cache. |
| 92 // http://crbug.com/85121 |
89 browser_context_->GetResourceContext(), | 93 browser_context_->GetResourceContext(), |
90 make_scoped_refptr( | 94 make_scoped_refptr( |
91 browser_context_->GetSpecialStoragePolicy()))); | 95 browser_context_->GetSpecialStoragePolicy()))); |
92 } | 96 } |
93 } | 97 } |
94 | 98 |
95 } // namespace content | 99 } // namespace content |
OLD | NEW |