Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/plugins/ppapi/file_callbacks.h" | 5 #include "webkit/plugins/ppapi/file_callbacks.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ppapi/c/pp_file_info.h" | 8 #include "ppapi/c/pp_file_info.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/c/ppb_file_system.h" | 10 #include "ppapi/c/ppb_file_system.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 info_->last_modified_time = TimeToPPTime(file_info.last_modified); | 58 info_->last_modified_time = TimeToPPTime(file_info.last_modified); |
| 59 info_->system_type = file_system_->type(); | 59 info_->system_type = file_system_->type(); |
| 60 if (file_info.is_directory) | 60 if (file_info.is_directory) |
| 61 info_->type = PP_FILETYPE_DIRECTORY; | 61 info_->type = PP_FILETYPE_DIRECTORY; |
| 62 else | 62 else |
| 63 info_->type = PP_FILETYPE_REGULAR; | 63 info_->type = PP_FILETYPE_REGULAR; |
| 64 | 64 |
| 65 callback_->Run(PP_OK); | 65 callback_->Run(PP_OK); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void FileCallbacks::DidCreateSnapshotFile( | |
| 69 const base::PlatformFileInfo& file_info, | |
| 70 const FilePath& path) { | |
|
brettw
2013/02/07 04:52:58
Ditto
| |
| 71 NOTREACHED(); | |
| 72 } | |
| 73 | |
| 68 void FileCallbacks::DidReadDirectory( | 74 void FileCallbacks::DidReadDirectory( |
| 69 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { | 75 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { |
| 70 if (callback_->completed()) | 76 if (callback_->completed()) |
| 71 return; | 77 return; |
| 72 | 78 |
| 73 DCHECK(directory_reader_); | 79 DCHECK(directory_reader_); |
| 74 directory_reader_->AddNewEntries(entries, has_more); | 80 directory_reader_->AddNewEntries(entries, has_more); |
| 75 | 81 |
| 76 callback_->Run(PP_OK); | 82 callback_->Run(PP_OK); |
| 77 } | 83 } |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 98 | 104 |
| 99 void FileCallbacks::RunCallback(base::PlatformFileError error_code) { | 105 void FileCallbacks::RunCallback(base::PlatformFileError error_code) { |
| 100 if (callback_->completed()) | 106 if (callback_->completed()) |
| 101 return; | 107 return; |
| 102 | 108 |
| 103 callback_->Run(::ppapi::PlatformFileErrorToPepperError(error_code)); | 109 callback_->Run(::ppapi::PlatformFileErrorToPepperError(error_code)); |
| 104 } | 110 } |
| 105 | 111 |
| 106 } // namespace ppapi | 112 } // namespace ppapi |
| 107 } // namespace webkit | 113 } // namespace webkit |
| OLD | NEW |