Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: chrome/utility/media_galleries/media_metadata_parser.h

Issue 2667443002: Convert utility process ParseMediaMetadata blob reading IPC to mojo (Closed)
Patch Set: Sync to ToT and merge in dependent patch changes. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/utility/media_galleries/media_metadata_parser.h
diff --git a/chrome/utility/media_galleries/media_metadata_parser.h b/chrome/utility/media_galleries/media_metadata_parser.h
index 1e7720b6a763ae8bbff810cdf67a2b8292abe2b7..e05681bb690d495000c48e5d600501292ac56bbc 100644
--- a/chrome/utility/media_galleries/media_metadata_parser.h
+++ b/chrome/utility/media_galleries/media_metadata_parser.h
@@ -26,8 +26,8 @@ namespace metadata {
// This class takes a MIME type and data source and parses its metadata. It
// handles audio, video, and images. It delegates its operations to FFMPEG.
-// This class lives and operates on the utility thread of the utility process,
-// as we wish to sandbox potentially dangerous operations on user-provided data.
+// This class lives and operates on the utility thread of the utility process
+// so we sandbox potentially dangerous operations on user-provided data.
class MediaMetadataParser {
public:
typedef extensions::api::media_galleries::MediaMetadata MediaMetadata;
@@ -36,9 +36,8 @@ class MediaMetadataParser {
const std::vector<AttachedImage>& attached_images)>
MetadataCallback;
- // Does not take ownership of |source|. Caller is responsible for ensuring
- // that |source| outlives this object.
- MediaMetadataParser(media::DataSource* source, const std::string& mime_type,
+ MediaMetadataParser(std::unique_ptr<media::DataSource> source,
+ const std::string& mime_type,
bool get_attached_images);
~MediaMetadataParser();
@@ -48,7 +47,7 @@ class MediaMetadataParser {
private:
// Only accessed on |media_thread_| from this class.
- media::DataSource* const source_;
+ std::unique_ptr<media::DataSource> source_;
const std::string mime_type_;
« no previous file with comments | « chrome/utility/media_galleries/ipc_data_source.cc ('k') | chrome/utility/media_galleries/media_metadata_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698