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

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

Issue 8826011: Remove PP_Module from parameters for PPB_Var.VarFromUtf8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 new FileCallbacks(plugin_instance->module()->AsWeakPtr(), 241 new FileCallbacks(plugin_instance->module()->AsWeakPtr(),
242 pp_resource(), callback, NULL, NULL, NULL))) 242 pp_resource(), callback, NULL, NULL, NULL)))
243 return PP_ERROR_FAILED; 243 return PP_ERROR_FAILED;
244 return PP_OK_COMPLETIONPENDING; 244 return PP_OK_COMPLETIONPENDING;
245 } 245 }
246 246
247 PP_Var PPB_FileRef_Impl::GetAbsolutePath() { 247 PP_Var PPB_FileRef_Impl::GetAbsolutePath() {
248 if (GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL) 248 if (GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL)
249 return GetPath(); 249 return GetPath();
250 if (!external_path_var_.get()) { 250 if (!external_path_var_.get()) {
251 PluginModule* plugin_module = ResourceHelper::GetPluginModule(this);
252 if (!plugin_module)
253 return PP_MakeNull();
254 external_path_var_ = new StringVar( 251 external_path_var_ = new StringVar(
255 plugin_module->pp_module(),
256 external_file_system_path_.AsUTF8Unsafe()); 252 external_file_system_path_.AsUTF8Unsafe());
257 } 253 }
258 return external_path_var_->GetPPVar(); 254 return external_path_var_->GetPPVar();
259 } 255 }
260 256
261 FilePath PPB_FileRef_Impl::GetSystemPath() const { 257 FilePath PPB_FileRef_Impl::GetSystemPath() const {
262 if (GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL) { 258 if (GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL) {
263 NOTREACHED(); 259 NOTREACHED();
264 return FilePath(); 260 return FilePath();
265 } 261 }
(...skipping 23 matching lines...) Expand all
289 return file_system_ && file_system_->opened(); 285 return file_system_ && file_system_->opened();
290 } 286 }
291 287
292 bool PPB_FileRef_Impl::IsValidNonExternalFileSystem() const { 288 bool PPB_FileRef_Impl::IsValidNonExternalFileSystem() const {
293 return file_system_ && file_system_->opened() && 289 return file_system_ && file_system_->opened() &&
294 file_system_->type() != PP_FILESYSTEMTYPE_EXTERNAL; 290 file_system_->type() != PP_FILESYSTEMTYPE_EXTERNAL;
295 } 291 }
296 292
297 } // namespace ppapi 293 } // namespace ppapi
298 } // namespace webkit 294 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698