| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/renderer/extensions/media_galleries_custom_bindings.h" | 5 #include "chrome/renderer/extensions/media_galleries_custom_bindings.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 NOTREACHED(); | 35 NOTREACHED(); |
| 36 return; | 36 return; |
| 37 } | 37 } |
| 38 | 38 |
| 39 std::string fsid(*v8::String::Utf8Value(args[0])); | 39 std::string fsid(*v8::String::Utf8Value(args[0])); |
| 40 if (fsid.empty()) { | 40 if (fsid.empty()) { |
| 41 NOTREACHED(); | 41 NOTREACHED(); |
| 42 return; | 42 return; |
| 43 } | 43 } |
| 44 | 44 |
| 45 WebKit::WebFrame* webframe = WebKit::WebFrame::frameForCurrentContext(); | 45 blink::WebFrame* webframe = blink::WebFrame::frameForCurrentContext(); |
| 46 const GURL origin = GURL(webframe->document().securityOrigin().toString()); | 46 const GURL origin = GURL(webframe->document().securityOrigin().toString()); |
| 47 const std::string fs_name = fileapi::GetIsolatedFileSystemName(origin, fsid); | 47 const std::string fs_name = fileapi::GetIsolatedFileSystemName(origin, fsid); |
| 48 const std::string root_url = | 48 const std::string root_url = |
| 49 fileapi::GetIsolatedFileSystemRootURIString( | 49 fileapi::GetIsolatedFileSystemRootURIString( |
| 50 origin, fsid, extension_misc::kMediaFileSystemPathPart); | 50 origin, fsid, extension_misc::kMediaFileSystemPathPart); |
| 51 args.GetReturnValue().Set( | 51 args.GetReturnValue().Set( |
| 52 webframe->createFileSystem(WebKit::WebFileSystemTypeIsolated, | 52 webframe->createFileSystem(blink::WebFileSystemTypeIsolated, |
| 53 WebKit::WebString::fromUTF8(fs_name), | 53 blink::WebString::fromUTF8(fs_name), |
| 54 WebKit::WebString::fromUTF8(root_url))); | 54 blink::WebString::fromUTF8(root_url))); |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace extensions | 57 } // namespace extensions |
| OLD | NEW |