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

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

Issue 7248047: Migrating PPB_FileIO_Dev, PPB_FileRef_Dev, and PPB_FileSystem_Dev dependencies to PPB_FileIO, PPB... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
OLDNEW
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/ppb_file_ref_impl.h" 5 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 PPB_FileRef_API* PPB_FileRef_Impl::AsPPB_FileRef_API() { 99 PPB_FileRef_API* PPB_FileRef_Impl::AsPPB_FileRef_API() {
100 return this; 100 return this;
101 } 101 }
102 102
103 PPB_FileRef_Impl* PPB_FileRef_Impl::AsPPB_FileRef_Impl() { 103 PPB_FileRef_Impl* PPB_FileRef_Impl::AsPPB_FileRef_Impl() {
104 return this; 104 return this;
105 } 105 }
106 106
107 PP_FileSystemType_Dev PPB_FileRef_Impl::GetFileSystemType() const { 107 PP_FileSystemType PPB_FileRef_Impl::GetFileSystemType() const {
108 // When the file ref exists but there's no explicit filesystem object 108 // When the file ref exists but there's no explicit filesystem object
109 // associated with it, that means it's an "external" filesystem. 109 // associated with it, that means it's an "external" filesystem.
110 if (!file_system_) 110 if (!file_system_)
111 return PP_FILESYSTEMTYPE_EXTERNAL; 111 return PP_FILESYSTEMTYPE_EXTERNAL;
112 return file_system_->type(); 112 return file_system_->type();
113 } 113 }
114 114
115 PP_Var PPB_FileRef_Impl::GetName() const { 115 PP_Var PPB_FileRef_Impl::GetName() const {
116 std::string result; 116 std::string result;
117 if (GetFileSystemType() == PP_FILESYSTEMTYPE_EXTERNAL) { 117 if (GetFileSystemType() == PP_FILESYSTEMTYPE_EXTERNAL) {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 return GURL(file_system_->root_url().spec() + virtual_path_.substr(1)); 249 return GURL(file_system_->root_url().spec() + virtual_path_.substr(1));
250 } 250 }
251 251
252 bool PPB_FileRef_Impl::IsValidNonExternalFileSystem() const { 252 bool PPB_FileRef_Impl::IsValidNonExternalFileSystem() const {
253 return file_system_ && file_system_->opened() && 253 return file_system_ && file_system_->opened() &&
254 file_system_->type() != PP_FILESYSTEMTYPE_EXTERNAL; 254 file_system_->type() != PP_FILESYSTEMTYPE_EXTERNAL;
255 } 255 }
256 256
257 } // namespace ppapi 257 } // namespace ppapi
258 } // namespace webkit 258 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698