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

Side by Side Diff: chrome/browser/media_galleries/fileapi/media_file_validator_factory.cc

Issue 624173002: replace OVERRIDE and FINAL with override and final in chrome/browser/[j-q]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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/media_file_validator_factory.h" 5 #include "chrome/browser/media_galleries/fileapi/media_file_validator_factory.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "chrome/browser/media_galleries/fileapi/supported_audio_video_checker.h " 8 #include "chrome/browser/media_galleries/fileapi/supported_audio_video_checker.h "
9 #include "chrome/browser/media_galleries/fileapi/supported_image_type_validator. h" 9 #include "chrome/browser/media_galleries/fileapi/supported_image_type_validator. h"
10 #include "storage/browser/fileapi/copy_or_move_file_validator.h" 10 #include "storage/browser/fileapi/copy_or_move_file_validator.h"
11 #include "storage/browser/fileapi/file_system_url.h" 11 #include "storage/browser/fileapi/file_system_url.h"
12 12
13 namespace { 13 namespace {
14 14
15 class InvalidFileValidator : public storage::CopyOrMoveFileValidator { 15 class InvalidFileValidator : public storage::CopyOrMoveFileValidator {
16 public: 16 public:
17 virtual ~InvalidFileValidator() {} 17 virtual ~InvalidFileValidator() {}
18 virtual void StartPreWriteValidation( 18 virtual void StartPreWriteValidation(
19 const storage::CopyOrMoveFileValidator::ResultCallback& result_callback) 19 const storage::CopyOrMoveFileValidator::ResultCallback& result_callback)
20 OVERRIDE { 20 override {
21 result_callback.Run(base::File::FILE_ERROR_SECURITY); 21 result_callback.Run(base::File::FILE_ERROR_SECURITY);
22 } 22 }
23 23
24 virtual void StartPostWriteValidation( 24 virtual void StartPostWriteValidation(
25 const base::FilePath& dest_platform_path, 25 const base::FilePath& dest_platform_path,
26 const storage::CopyOrMoveFileValidator::ResultCallback& result_callback) 26 const storage::CopyOrMoveFileValidator::ResultCallback& result_callback)
27 OVERRIDE { 27 override {
28 result_callback.Run(base::File::FILE_ERROR_SECURITY); 28 result_callback.Run(base::File::FILE_ERROR_SECURITY);
29 } 29 }
30 30
31 private: 31 private:
32 friend class ::MediaFileValidatorFactory; 32 friend class ::MediaFileValidatorFactory;
33 33
34 InvalidFileValidator() {} 34 InvalidFileValidator() {}
35 35
36 DISALLOW_COPY_AND_ASSIGN(InvalidFileValidator); 36 DISALLOW_COPY_AND_ASSIGN(InvalidFileValidator);
37 }; 37 };
38 38
39 } // namespace 39 } // namespace
40 40
41 MediaFileValidatorFactory::MediaFileValidatorFactory() {} 41 MediaFileValidatorFactory::MediaFileValidatorFactory() {}
42 MediaFileValidatorFactory::~MediaFileValidatorFactory() {} 42 MediaFileValidatorFactory::~MediaFileValidatorFactory() {}
43 43
44 storage::CopyOrMoveFileValidator* 44 storage::CopyOrMoveFileValidator*
45 MediaFileValidatorFactory::CreateCopyOrMoveFileValidator( 45 MediaFileValidatorFactory::CreateCopyOrMoveFileValidator(
46 const storage::FileSystemURL& src, 46 const storage::FileSystemURL& src,
47 const base::FilePath& platform_path) { 47 const base::FilePath& platform_path) {
48 base::FilePath src_path = src.virtual_path(); 48 base::FilePath src_path = src.virtual_path();
49 if (SupportedImageTypeValidator::SupportsFileType(src_path)) 49 if (SupportedImageTypeValidator::SupportsFileType(src_path))
50 return new SupportedImageTypeValidator(platform_path); 50 return new SupportedImageTypeValidator(platform_path);
51 if (SupportedAudioVideoChecker::SupportsFileType(src_path)) 51 if (SupportedAudioVideoChecker::SupportsFileType(src_path))
52 return new SupportedAudioVideoChecker(platform_path); 52 return new SupportedAudioVideoChecker(platform_path);
53 53
54 return new InvalidFileValidator(); 54 return new InvalidFileValidator();
55 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698