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