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 <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 SupportedAudioVideoChecker::SupportedAudioVideoChecker( | 81 SupportedAudioVideoChecker::SupportedAudioVideoChecker( |
82 const base::FilePath& path) | 82 const base::FilePath& path) |
83 : path_(path), | 83 : path_(path), |
84 weak_factory_(this) { | 84 weak_factory_(this) { |
85 } | 85 } |
86 | 86 |
87 void SupportedAudioVideoChecker::OnFileOpen(const base::PlatformFile& file) { | 87 void SupportedAudioVideoChecker::OnFileOpen(const base::PlatformFile& file) { |
88 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); | 88 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); |
89 if (file == base::kInvalidPlatformFileValue) { | 89 if (file == base::kInvalidPlatformFileValue) { |
90 callback_.Run(base::PLATFORM_FILE_ERROR_SECURITY); | 90 callback_.Run(base::File::FILE_ERROR_SECURITY); |
91 return; | 91 return; |
92 } | 92 } |
93 | 93 |
94 safe_checker_ = new SafeAudioVideoChecker(file, callback_); | 94 safe_checker_ = new SafeAudioVideoChecker(file, callback_); |
95 safe_checker_->Start(); | 95 safe_checker_->Start(); |
96 } | 96 } |
OLD | NEW |