OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/media_galleries/fileapi/supported_audio_video_checker.h
" | 5 #include "chrome/browser/media_galleries/fileapi/supported_audio_video_checker.h
" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | |
9 #include <set> | 8 #include <set> |
| 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/lazy_instance.h" | 14 #include "base/lazy_instance.h" |
15 #include "base/location.h" | 15 #include "base/location.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/stl_util.h" | 18 #include "base/stl_util.h" |
19 #include "chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h" | 19 #include "chrome/browser/media_galleries/fileapi/safe_audio_video_checker.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 weak_factory_(this) { | 86 weak_factory_(this) { |
87 } | 87 } |
88 | 88 |
89 void SupportedAudioVideoChecker::OnFileOpen(base::File file) { | 89 void SupportedAudioVideoChecker::OnFileOpen(base::File file) { |
90 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); | 90 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
91 if (!file.IsValid()) { | 91 if (!file.IsValid()) { |
92 callback_.Run(base::File::FILE_ERROR_SECURITY); | 92 callback_.Run(base::File::FILE_ERROR_SECURITY); |
93 return; | 93 return; |
94 } | 94 } |
95 | 95 |
96 safe_checker_ = new SafeAudioVideoChecker(file.Pass(), callback_); | 96 safe_checker_ = new SafeAudioVideoChecker(std::move(file), callback_); |
97 safe_checker_->Start(); | 97 safe_checker_->Start(); |
98 } | 98 } |
OLD | NEW |