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

Side by Side Diff: webkit/fileapi/file_system_util.cc

Issue 10332240: Adding isolated filesystem support in GetFileSystemRootURI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/fileapi/file_system_util.h" 5 #include "webkit/fileapi/file_system_util.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 switch (type) { 142 switch (type) {
143 case kFileSystemTypeTemporary: 143 case kFileSystemTypeTemporary:
144 url += (kTemporaryDir + 1); // We don't want the leading slash. 144 url += (kTemporaryDir + 1); // We don't want the leading slash.
145 return GURL(url + "/"); 145 return GURL(url + "/");
146 case kFileSystemTypePersistent: 146 case kFileSystemTypePersistent:
147 url += (kPersistentDir + 1); // We don't want the leading slash. 147 url += (kPersistentDir + 1); // We don't want the leading slash.
148 return GURL(url + "/"); 148 return GURL(url + "/");
149 case kFileSystemTypeExternal: 149 case kFileSystemTypeExternal:
150 url += (kExternalDir + 1); // We don't want the leading slash. 150 url += (kExternalDir + 1); // We don't want the leading slash.
151 return GURL(url + "/"); 151 return GURL(url + "/");
152 case kFileSystemTypeIsolated:
153 url += (kIsolatedDir + 1); // We don't want the leading slash.
154 return GURL(url + "/");
152 case kFileSystemTypeTest: 155 case kFileSystemTypeTest:
153 url += (kTestDir + 1); // We don't want the leading slash. 156 url += (kTestDir + 1); // We don't want the leading slash.
154 return GURL(url + "/"); 157 return GURL(url + "/");
155 case kFileSystemTypeIsolated:
156 // Falling through; we won't call this for isolated filesystems.
157 case kFileSystemTypeUnknown: 158 case kFileSystemTypeUnknown:
158 NOTREACHED(); 159 NOTREACHED();
159 } 160 }
160 NOTREACHED(); 161 NOTREACHED();
161 return GURL(); 162 return GURL();
162 } 163 }
163 164
164 std::string GetFileSystemName(const GURL& origin_url, FileSystemType type) { 165 std::string GetFileSystemName(const GURL& origin_url, FileSystemType type) {
165 std::string origin_identifier = GetOriginIdentifierFromURL(origin_url); 166 std::string origin_identifier = GetOriginIdentifierFromURL(origin_url);
166 std::string type_string = GetFileSystemTypeString(type); 167 std::string type_string = GetFileSystemTypeString(type);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 241
241 FilePath StringToFilePath(const std::string& file_path_string) { 242 FilePath StringToFilePath(const std::string& file_path_string) {
242 #if defined(OS_WIN) 243 #if defined(OS_WIN)
243 return FilePath(UTF8ToUTF16(file_path_string)); 244 return FilePath(UTF8ToUTF16(file_path_string));
244 #elif defined(OS_POSIX) 245 #elif defined(OS_POSIX)
245 return FilePath(file_path_string); 246 return FilePath(file_path_string);
246 #endif 247 #endif
247 } 248 }
248 249
249 } // namespace fileapi 250 } // namespace fileapi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698