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

Unified Diff: chrome/renderer/extensions/media_gallery_custom_bindings.cc

Issue 10827057: Plumb file system name down from MediaFileSystemRegistry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/media_gallery_custom_bindings.cc
diff --git a/chrome/renderer/extensions/media_gallery_custom_bindings.cc b/chrome/renderer/extensions/media_gallery_custom_bindings.cc
index 2b8a6d3a8c7233a651abf104443e6697284385b8..445d74a39a8e21e5ec487f25439a3cc86fc58dfe 100644
--- a/chrome/renderer/extensions/media_gallery_custom_bindings.cc
+++ b/chrome/renderer/extensions/media_gallery_custom_bindings.cc
@@ -8,6 +8,7 @@
#include "base/file_path.h"
#include "base/stringprintf.h"
+#include "chrome/common/extensions/extension_constants.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "v8/include/v8.h"
@@ -47,8 +48,8 @@ v8::Handle<v8::Value> MediaGalleryCustomBindings::GetMediaFileSystemObject(
NOTREACHED();
return v8::Undefined();
}
- std::string dirname(*v8::String::Utf8Value(args[1]));
- if (dirname.empty()) {
+ std::string name(*v8::String::Utf8Value(args[1]));
+ if (name.empty()) {
NOTREACHED();
return v8::Undefined();
}
@@ -57,13 +58,11 @@ v8::Handle<v8::Value> MediaGalleryCustomBindings::GetMediaFileSystemObject(
const GURL origin = GURL(webframe->document().securityOrigin().toString());
const GURL root_url =
fileapi::GetFileSystemRootURI(origin, fileapi::kFileSystemTypeIsolated);
- const std::string fsname = fileapi::GetIsolatedFileSystemName(origin, fsid);
- const std::string url = base::StringPrintf("%s%s/%s/",
- root_url.spec().c_str(),
- fsid.c_str(),
- dirname.c_str());
+ const std::string url =
+ base::StringPrintf("%s%s/%s/", root_url.spec().c_str(), fsid.c_str(),
+ extension_misc::kMediaFileSystemPathPart);
return webframe->createFileSystem(WebKit::WebFileSystem::TypeIsolated,
- WebKit::WebString::fromUTF8(fsname),
+ WebKit::WebString::fromUTF8(name),
WebKit::WebString::fromUTF8(url));
}

Powered by Google App Engine
This is Rietveld 408576698