| Index: chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc
|
| diff --git a/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc b/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc
|
| index 7bf23e3c6c8b7d6a661c63c17722660015aedaac..b3fdb4e41e30e461909cc8e29f26fbd7d07db426 100644
|
| --- a/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc
|
| +++ b/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc
|
| @@ -14,14 +14,14 @@ using content::BrowserThread;
|
|
|
| namespace metadata {
|
|
|
| -SafeMediaMetadataParser::SafeMediaMetadataParser(Profile* profile,
|
| - const std::string& blob_uuid,
|
| - int64 blob_size,
|
| - const std::string& mime_type)
|
| +SafeMediaMetadataParser::SafeMediaMetadataParser(
|
| + Profile* profile, const std::string& blob_uuid, int64 blob_size,
|
| + const std::string& mime_type, bool get_attached_pictures)
|
| : profile_(profile),
|
| blob_uuid_(blob_uuid),
|
| blob_size_(blob_size),
|
| mime_type_(mime_type),
|
| + get_attached_pictures_(get_attached_pictures),
|
| parser_state_(INITIAL_STATE) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| }
|
| @@ -51,13 +51,15 @@ void SafeMediaMetadataParser::StartWorkOnIOThread(
|
| this, base::MessageLoopProxy::current())->AsWeakPtr();
|
|
|
| utility_process_host_->Send(
|
| - new ChromeUtilityMsg_ParseMediaMetadata(mime_type_, blob_size_));
|
| + new ChromeUtilityMsg_ParseMediaMetadata(mime_type_, blob_size_,
|
| + get_attached_pictures_));
|
|
|
| parser_state_ = STARTED_PARSING_STATE;
|
| }
|
|
|
| void SafeMediaMetadataParser::OnParseMediaMetadataFinished(
|
| - bool parse_success, const base::DictionaryValue& metadata_dictionary) {
|
| + bool parse_success, const base::DictionaryValue& metadata_dictionary,
|
| + const std::vector<AttachedPicture>& attached_pictures) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| DCHECK(!callback_.is_null());
|
|
|
| @@ -68,7 +70,8 @@ void SafeMediaMetadataParser::OnParseMediaMetadataFinished(
|
| BrowserThread::UI,
|
| FROM_HERE,
|
| base::Bind(callback_, parse_success,
|
| - base::Owned(metadata_dictionary.DeepCopy())));
|
| + base::Owned(metadata_dictionary.DeepCopy()),
|
| + attached_pictures));
|
| parser_state_ = FINISHED_PARSING_STATE;
|
| }
|
|
|
| @@ -120,7 +123,8 @@ void SafeMediaMetadataParser::OnProcessCrashed(int exit_code) {
|
| BrowserThread::PostTask(
|
| BrowserThread::UI,
|
| FROM_HERE,
|
| - base::Bind(callback_, false, base::Owned(new base::DictionaryValue)));
|
| + base::Bind(callback_, false, base::Owned(new base::DictionaryValue),
|
| + std::vector<AttachedPicture>()));
|
| parser_state_ = FINISHED_PARSING_STATE;
|
| }
|
|
|
|
|