| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_file_system_helper.h" | 5 #include "chrome/browser/browsing_data_file_system_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 BrowserThread::PostTask( | 106 BrowserThread::PostTask( |
| 107 BrowserThread::FILE, FROM_HERE, | 107 BrowserThread::FILE, FROM_HERE, |
| 108 base::Bind( | 108 base::Bind( |
| 109 &BrowsingDataFileSystemHelperImpl::DeleteFileSystemOriginInFileThread, | 109 &BrowsingDataFileSystemHelperImpl::DeleteFileSystemOriginInFileThread, |
| 110 this, origin)); | 110 this, origin)); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void BrowsingDataFileSystemHelperImpl::FetchFileSystemInfoInFileThread() { | 113 void BrowsingDataFileSystemHelperImpl::FetchFileSystemInfoInFileThread() { |
| 114 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 114 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 115 scoped_ptr<fileapi::SandboxMountPointProvider::OriginEnumerator> | 115 scoped_ptr<fileapi::SandboxMountPointProvider::OriginEnumerator> |
| 116 origin_enumerator(profile_->GetFileSystemContext()->path_manager()-> | 116 origin_enumerator(profile_->GetFileSystemContext()-> |
| 117 sandbox_provider()->CreateOriginEnumerator()); | 117 sandbox_provider()->CreateOriginEnumerator()); |
| 118 | 118 |
| 119 // We don't own this pointer; it's a magic singleton generated by the | 119 // We don't own this pointer; it's a magic singleton generated by the |
| 120 // profile's FileSystemContext. Deleting it would be a bad idea. | 120 // profile's FileSystemContext. Deleting it would be a bad idea. |
| 121 fileapi::FileSystemQuotaUtil* quota_util = profile_-> | 121 fileapi::FileSystemQuotaUtil* quota_util = profile_-> |
| 122 GetFileSystemContext()->GetQuotaUtil(fileapi::kFileSystemTypeTemporary); | 122 GetFileSystemContext()->GetQuotaUtil(fileapi::kFileSystemTypeTemporary); |
| 123 | 123 |
| 124 GURL current; | 124 GURL current; |
| 125 while (!(current = origin_enumerator->Next()).is_empty()) { | 125 while (!(current = origin_enumerator->Next()).is_empty()) { |
| 126 if (current.SchemeIs(chrome::kExtensionScheme)) { | 126 if (current.SchemeIs(chrome::kExtensionScheme)) { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 completion_callback_.Run(file_system_info_); | 275 completion_callback_.Run(file_system_info_); |
| 276 completion_callback_.Reset(); | 276 completion_callback_.Reset(); |
| 277 } | 277 } |
| 278 is_fetching_ = false; | 278 is_fetching_ = false; |
| 279 } | 279 } |
| 280 | 280 |
| 281 void CannedBrowsingDataFileSystemHelper::CancelNotification() { | 281 void CannedBrowsingDataFileSystemHelper::CancelNotification() { |
| 282 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 282 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 283 completion_callback_.Reset(); | 283 completion_callback_.Reset(); |
| 284 } | 284 } |
| OLD | NEW |