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 "chrome/browser/browsing_data/browsing_data_file_system_helper.h" | 5 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 this, origin)); | 118 this, origin)); |
119 } | 119 } |
120 | 120 |
121 void BrowsingDataFileSystemHelperImpl::FetchFileSystemInfoInFileThread() { | 121 void BrowsingDataFileSystemHelperImpl::FetchFileSystemInfoInFileThread() { |
122 DCHECK(file_task_runner()->RunsTasksOnCurrentThread()); | 122 DCHECK(file_task_runner()->RunsTasksOnCurrentThread()); |
123 | 123 |
124 // We check usage for these filesystem types. | 124 // We check usage for these filesystem types. |
125 const storage::FileSystemType types[] = { | 125 const storage::FileSystemType types[] = { |
126 storage::kFileSystemTypeTemporary, | 126 storage::kFileSystemTypeTemporary, |
127 storage::kFileSystemTypePersistent, | 127 storage::kFileSystemTypePersistent, |
| 128 storage::kFileSystemTypePluginPrivate, |
128 #if defined(ENABLE_EXTENSIONS) | 129 #if defined(ENABLE_EXTENSIONS) |
129 storage::kFileSystemTypeSyncable, | 130 storage::kFileSystemTypeSyncable, |
130 #endif | 131 #endif |
131 }; | 132 }; |
132 | 133 |
133 typedef std::map<GURL, FileSystemInfo> OriginInfoMap; | 134 typedef std::map<GURL, FileSystemInfo> OriginInfoMap; |
134 OriginInfoMap file_system_info_map; | 135 OriginInfoMap file_system_info_map; |
135 for (size_t i = 0; i < arraysize(types); ++i) { | 136 for (size_t i = 0; i < arraysize(types); ++i) { |
136 storage::FileSystemType type = types[i]; | 137 storage::FileSystemType type = types[i]; |
137 storage::FileSystemQuotaUtil* quota_util = | 138 storage::FileSystemQuotaUtil* quota_util = |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 } | 242 } |
242 | 243 |
243 void CannedBrowsingDataFileSystemHelper::StartFetching( | 244 void CannedBrowsingDataFileSystemHelper::StartFetching( |
244 const base::Callback<void(const std::list<FileSystemInfo>&)>& callback) { | 245 const base::Callback<void(const std::list<FileSystemInfo>&)>& callback) { |
245 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 246 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
246 DCHECK(!callback.is_null()); | 247 DCHECK(!callback.is_null()); |
247 | 248 |
248 BrowserThread::PostTask( | 249 BrowserThread::PostTask( |
249 BrowserThread::UI, FROM_HERE, base::Bind(callback, file_system_info_)); | 250 BrowserThread::UI, FROM_HERE, base::Bind(callback, file_system_info_)); |
250 } | 251 } |
OLD | NEW |