Commit 8c38ae0d authored by satorux@chromium.org's avatar satorux@chromium.org

file_manager: Rename root_path to root_url

The term path is incorrect as the parameter is for a URL.

FWIW, the URL looks like:
"filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/external/"
where hhaomjibdihmijegdhdafkllkbggdgoj is the app ID for Files.app.

BUG=284963
TEST=Files.app works as before
R=benwells@chromium.org, kinuko@chromium.org

Review URL: https://codereview.chromium.org/23903016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221981 0039d316-1c4b-4281-b951-d872f2087c98
parent 0a6c168d
......@@ -189,7 +189,7 @@ void FileBrowserPrivateRequestFileSystemFunction::DidOpenFileSystem(
scoped_refptr<fileapi::FileSystemContext> file_system_context,
base::PlatformFileError result,
const std::string& name,
const GURL& root_path) {
const GURL& root_url) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (result != base::PLATFORM_FILE_OK) {
......@@ -224,7 +224,7 @@ void FileBrowserPrivateRequestFileSystemFunction::DidOpenFileSystem(
DictionaryValue* dict = new DictionaryValue();
SetResult(dict);
dict->SetString("name", name);
dict->SetString("path", root_path.spec());
dict->SetString("root_url", root_url.spec());
dict->SetInteger("error", drive::FILE_ERROR_OK);
SendResponse(true);
}
......
......@@ -42,7 +42,7 @@ class FileBrowserPrivateRequestFileSystemFunction
private:
void RespondSuccessOnUIThread(const std::string& name,
const GURL& root_path);
const GURL& root_url);
void RespondFailedOnUIThread(base::PlatformFileError error_code);
// Called when FileSystemContext::OpenFileSystem() is done.
......@@ -50,7 +50,7 @@ class FileBrowserPrivateRequestFileSystemFunction
scoped_refptr<fileapi::FileSystemContext> file_system_context,
base::PlatformFileError result,
const std::string& name,
const GURL& root_path);
const GURL& root_url);
// Called when something goes wrong. Records the error to |error_| per the
// error code and reports that the private API function failed.
......
......@@ -32,7 +32,7 @@ void FileBrowserPrivateCustomBindings::GetFileSystem(
DCHECK(args[0]->IsString());
DCHECK(args[1]->IsString());
std::string name(*v8::String::Utf8Value(args[0]));
std::string path(*v8::String::Utf8Value(args[1]));
std::string root_url(*v8::String::Utf8Value(args[1]));
WebKit::WebFrame* webframe =
WebKit::WebFrame::frameForContext(context()->v8_context());
......@@ -41,7 +41,7 @@ void FileBrowserPrivateCustomBindings::GetFileSystem(
webframe->createFileSystem(
WebKit::WebFileSystemTypeExternal,
WebKit::WebString::fromUTF8(name.c_str()),
WebKit::WebString::fromUTF8(path.c_str())));
WebKit::WebString::fromUTF8(root_url.c_str())));
}
} // namespace extensions
......@@ -19,7 +19,7 @@ binding.registerCustomHook(function(bindingsAPI) {
function(name, request, response) {
var fs = null;
if (response && !response.error)
fs = GetFileSystem(response.name, response.path);
fs = GetFileSystem(response.name, response.root_url);
if (request.callback)
request.callback(fs);
request.callback = null;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment