Chromium Code Reviews| Index: chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc |
| diff --git a/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc b/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc |
| index 00c601d8644ccc9ea2abcac68cce3def5925de1d..72cf67f7f670d9dca6c0cd354cfed4b58ed8685e 100644 |
| --- a/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc |
| +++ b/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc |
| @@ -14,6 +14,7 @@ |
| #include "base/threading/thread_restrictions.h" |
| #include "chrome/browser/image_decoder.h" |
| #include "content/public/browser/browser_thread.h" |
| +#include "webkit/common/blob/shareable_file_reference.h" |
| using content::BrowserThread; |
| @@ -112,7 +113,7 @@ bool SupportedImageTypeValidator::SupportsFileType(const base::FilePath& path) { |
| } |
| void SupportedImageTypeValidator::StartValidation( |
| - const fileapi::CopyOrMoveFileValidator::ResultCallback& result_callback) { |
| + const ResultCallback& result_callback) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| DCHECK(callback_.is_null()); |
| callback_ = result_callback; |
| @@ -125,6 +126,20 @@ void SupportedImageTypeValidator::StartValidation( |
| weak_factory_.GetWeakPtr())); |
| } |
| +void SupportedImageTypeValidator::StartPostWriteValidation( |
| + const base::FilePath& dest_platform_path, |
| + scoped_refptr<webkit_blob::ShareableFileReference> file_ref, |
| + const ResultCallback& result_callback) { |
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| + callback_ = result_callback; |
|
kinuko
2013/07/04 03:10:12
Can we reset callback_ when it becomes no longer n
Greg Billock
2013/07/08 20:01:53
OnFileOpen is forwarding that callback to the imag
|
| + |
| + // TODO(gbillock): Insert AV call here in the right validator. |
| + BrowserThread::PostTask( |
| + BrowserThread::IO, |
| + FROM_HERE, |
| + base::Bind(callback_, base::PLATFORM_FILE_OK)); |
| +} |
| + |
| SupportedImageTypeValidator::SupportedImageTypeValidator( |
| const base::FilePath& path) |
| : path_(path), |