OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ppapi/c/dev/ppb_file_system_dev.h" | 9 #include "ppapi/c/dev/ppb_file_system_dev.h" |
10 #include "ppapi/c/dev/pp_file_info_dev.h" | 10 #include "ppapi/c/dev/pp_file_info_dev.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 FileCallbacks::~FileCallbacks() {} | 37 FileCallbacks::~FileCallbacks() {} |
38 | 38 |
39 void FileCallbacks::DidSucceed() { | 39 void FileCallbacks::DidSucceed() { |
40 if (callback_->completed()) | 40 if (callback_->completed()) |
41 return; | 41 return; |
42 | 42 |
43 callback_->Run(PP_OK); | 43 callback_->Run(PP_OK); |
44 } | 44 } |
45 | 45 |
46 void FileCallbacks::DidReadMetadata( | 46 void FileCallbacks::DidReadMetadata( |
47 const base::PlatformFileInfo& file_info) { | 47 const base::PlatformFileInfo& file_info, |
| 48 const FilePath& unused) { |
48 if (callback_->completed()) | 49 if (callback_->completed()) |
49 return; | 50 return; |
50 | 51 |
51 DCHECK(info_); | 52 DCHECK(info_); |
52 DCHECK(file_system_); | 53 DCHECK(file_system_); |
53 info_->size = file_info.size; | 54 info_->size = file_info.size; |
54 info_->creation_time = file_info.creation_time.ToDoubleT(); | 55 info_->creation_time = file_info.creation_time.ToDoubleT(); |
55 info_->last_access_time = file_info.last_accessed.ToDoubleT(); | 56 info_->last_access_time = file_info.last_accessed.ToDoubleT(); |
56 info_->last_modified_time = file_info.last_modified.ToDoubleT(); | 57 info_->last_modified_time = file_info.last_modified.ToDoubleT(); |
57 info_->system_type = file_system_->type(); | 58 info_->system_type = file_system_->type(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 | 97 |
97 void FileCallbacks::RunCallback(base::PlatformFileError error_code) { | 98 void FileCallbacks::RunCallback(base::PlatformFileError error_code) { |
98 if (callback_->completed()) | 99 if (callback_->completed()) |
99 return; | 100 return; |
100 | 101 |
101 callback_->Run(PlatformFileErrorToPepperError(error_code)); | 102 callback_->Run(PlatformFileErrorToPepperError(error_code)); |
102 } | 103 } |
103 | 104 |
104 } // namespace ppapi | 105 } // namespace ppapi |
105 } // namespace webkit | 106 } // namespace webkit |
OLD | NEW |