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

Side by Side Diff: chrome/renderer/extensions/file_system_natives.cc

Issue 10879002: kFileSystemTypeIsolated should be only used in the URL exposed to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/file_system_natives.h" 5 #include "chrome/renderer/extensions/file_system_natives.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 16 matching lines...) Expand all
27 WebKit::WebFrame* webframe = WebKit::WebFrame::frameForCurrentContext(); 27 WebKit::WebFrame* webframe = WebKit::WebFrame::frameForCurrentContext();
28 DCHECK(webframe); 28 DCHECK(webframe);
29 29
30 GURL context_url = 30 GURL context_url =
31 extensions::UserScriptSlave::GetDataSourceURLForFrame(webframe); 31 extensions::UserScriptSlave::GetDataSourceURLForFrame(webframe);
32 CHECK(context_url.SchemeIs(chrome::kExtensionScheme)); 32 CHECK(context_url.SchemeIs(chrome::kExtensionScheme));
33 33
34 std::string name(fileapi::GetIsolatedFileSystemName(context_url.GetOrigin(), 34 std::string name(fileapi::GetIsolatedFileSystemName(context_url.GetOrigin(),
35 file_system_id)); 35 file_system_id));
36 36
37 std::string root(fileapi::GetFileSystemRootURI(context_url.GetOrigin(), 37 std::string root(fileapi::GetFileSystemRootURI(
38 fileapi::kFileSystemTypeIsolated).spec()); 38 context_url.GetOrigin(),
39 fileapi::kFileSystemTypeIsolated).spec());
39 root.append(file_system_id); 40 root.append(file_system_id);
40 root.append("/"); 41 root.append("/");
41 42
42 return webframe->createFileSystem( 43 return webframe->createFileSystem(
43 WebKit::WebFileSystem::TypeIsolated, 44 WebKit::WebFileSystem::TypeIsolated,
44 WebKit::WebString::fromUTF8(name.c_str()), 45 WebKit::WebString::fromUTF8(name.c_str()),
45 WebKit::WebString::fromUTF8(root.c_str())); 46 WebKit::WebString::fromUTF8(root.c_str()));
46 } 47 }
47 48
48 } // namespace 49 } // namespace
49 50
50 namespace extensions { 51 namespace extensions {
51 52
52 FileSystemNatives::FileSystemNatives() 53 FileSystemNatives::FileSystemNatives()
53 : ChromeV8Extension(NULL) { 54 : ChromeV8Extension(NULL) {
54 RouteStaticFunction("GetIsolatedFileSystem", &GetIsolatedFileSystem); 55 RouteStaticFunction("GetIsolatedFileSystem", &GetIsolatedFileSystem);
55 } 56 }
56 57
57 } // namespace extensions 58 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/platform_app_launcher.cc ('k') | content/browser/fileapi/fileapi_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698