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

Unified Diff: chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc

Issue 2751663002: Safe audio video checker: create mojo client with MakeUnique<> (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
diff --git a/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc b/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
index f6bd328674f2a7ed27514dc01d1ad99b329e096a..7676c85369e4743a156e76049b814e6b8340a975 100644
--- a/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
+++ b/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
@@ -17,7 +17,7 @@ SafeAudioVideoChecker::SafeAudioVideoChecker(
base::File file,
const storage::CopyOrMoveFileValidator::ResultCallback& callback)
: file_(std::move(file)), callback_(callback) {
- DCHECK(!callback_.is_null());
+ DCHECK(callback_);
}
void SafeAudioVideoChecker::Start() {
@@ -30,12 +30,9 @@ void SafeAudioVideoChecker::Start() {
DCHECK(!utility_process_mojo_client_);
- const base::string16 utility_process_name =
- l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_MEDIA_FILE_CHECKER_NAME);
-
- utility_process_mojo_client_.reset(
- new content::UtilityProcessMojoClient<extensions::mojom::MediaParser>(
- utility_process_name));
+ utility_process_mojo_client_ = base::MakeUnique<
+ content::UtilityProcessMojoClient<extensions::mojom::MediaParser>>(
+ l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_MEDIA_FILE_CHECKER_NAME));
utility_process_mojo_client_->set_error_callback(
base::Bind(&SafeAudioVideoChecker::CheckMediaFileDone, this, false));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698