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

Unified Diff: chrome/browser/extensions/api/file_system/file_system_api.cc

Issue 10544069: Change platform app api getDisplayPath to take FileEntry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/api/file_system.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/file_system/file_system_api.cc
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
index d9a31049cb8896f138e032e196faa6e61d913760..7c3fa9a5bb046c805e3729193537939ee2b218f1 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
@@ -5,33 +5,31 @@
#include "chrome/browser/extensions/api/file_system/file_system_api.h"
#include "base/file_path.h"
-#include "chrome/common/extensions/api/file_system.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/render_process_host.h"
#include "webkit/fileapi/file_system_util.h"
#include "webkit/fileapi/isolated_context.h"
-namespace GetDisplayPath = extensions::api::file_system::GetDisplayPath;
-
namespace extensions {
const char kInvalidParameters[] = "Invalid parameters";
const char kSecurityError[] = "Security error";
bool FileSystemGetDisplayPathFunction::RunImpl() {
- scoped_ptr<GetDisplayPath::Params> params(GetDisplayPath::Params::Create(
- *args_));
- EXTENSION_FUNCTION_VALIDATE(params.get());
+ std::string filesystem_name;
+ std::string filesystem_path;
+ EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &filesystem_name));
+ EXTENSION_FUNCTION_VALIDATE(args_->GetString(1, &filesystem_path));
std::string filesystem_id;
- if (!fileapi::CrackIsolatedFileSystemName(params->fsname, &filesystem_id)) {
+ if (!fileapi::CrackIsolatedFileSystemName(filesystem_name, &filesystem_id)) {
error_ = kInvalidParameters;
return false;
}
fileapi::IsolatedContext* context = fileapi::IsolatedContext::GetInstance();
- FilePath relative_path = FilePath::FromUTF8Unsafe(params->fspath);
+ FilePath relative_path = FilePath::FromUTF8Unsafe(filesystem_path);
FilePath virtual_path = context->CreateVirtualPath(filesystem_id,
relative_path);
FilePath file_path;
« no previous file with comments | « no previous file | chrome/common/extensions/api/file_system.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698