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

Side by Side Diff: webkit/plugins/ppapi/file_callbacks.cc

Issue 6731033: Remove the path from PlatformFileInfo; it's cleaner just to pass it along as a (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/ppapi/file_callbacks.h ('k') | webkit/tools/test_shell/simple_file_system.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/file_callbacks.h ('k') | webkit/tools/test_shell/simple_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698