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/av_scanning_file_validator.h" | 5 #include "chrome/browser/media_galleries/fileapi/av_scanning_file_validator.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 #endif | 10 #endif |
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/location.h" | 14 #include "base/location.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "chrome/common/chrome_constants.h" | 17 #include "chrome/common/chrome_constants.h" |
18 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
19 | 19 |
20 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
21 #include "base/win/scoped_comptr.h" | 21 #include "base/win/scoped_comptr.h" |
22 #endif | 22 #endif |
23 | 23 |
24 using content::BrowserThread; | 24 using content::BrowserThread; |
25 | 25 |
26 namespace chrome { | |
27 | |
28 namespace { | 26 namespace { |
29 | 27 |
30 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
31 base::PlatformFileError ScanFile( | 29 base::PlatformFileError ScanFile( |
32 const base::FilePath& dest_platform_path) { | 30 const base::FilePath& dest_platform_path) { |
33 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 31 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
34 | 32 |
35 base::win::ScopedComPtr<IAttachmentExecute> attachment_services; | 33 base::win::ScopedComPtr<IAttachmentExecute> attachment_services; |
36 HRESULT hr = attachment_services.CreateInstance(CLSID_AttachmentServices); | 34 HRESULT hr = attachment_services.CreateInstance(CLSID_AttachmentServices); |
37 | 35 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 FROM_HERE, | 68 FROM_HERE, |
71 base::Bind(&ScanFile, dest_platform_path), | 69 base::Bind(&ScanFile, dest_platform_path), |
72 result_callback); | 70 result_callback); |
73 #else | 71 #else |
74 result_callback.Run(base::PLATFORM_FILE_OK); | 72 result_callback.Run(base::PLATFORM_FILE_OK); |
75 #endif | 73 #endif |
76 } | 74 } |
77 | 75 |
78 AVScanningFileValidator::AVScanningFileValidator() { | 76 AVScanningFileValidator::AVScanningFileValidator() { |
79 } | 77 } |
80 | |
81 } // namespace chrome | |
OLD | NEW |