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

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

Issue 10810053: Enables internal filesystem types via Isolated filesystems (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 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 "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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
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: 152 case kFileSystemTypeIsolated:
153 url += (kIsolatedDir + 1); // We don't want the leading slash. 153 url += (kIsolatedDir + 1); // We don't want the leading slash.
154 return GURL(url + "/"); 154 return GURL(url + "/");
155 case kFileSystemTypeTest: 155 case kFileSystemTypeTest:
156 url += (kTestDir + 1); // We don't want the leading slash. 156 url += (kTestDir + 1); // We don't want the leading slash.
157 return GURL(url + "/"); 157 return GURL(url + "/");
158 case kFileSystemTypeUnknown: 158 case kFileSystemTypeUnknown:
159 case kFileSystemTypeDragged:
160 case kFileSystemTypeMedia:
159 NOTREACHED(); 161 NOTREACHED();
160 } 162 }
161 NOTREACHED(); 163 NOTREACHED();
162 return GURL(); 164 return GURL();
163 } 165 }
164 166
165 std::string GetFileSystemName(const GURL& origin_url, FileSystemType type) { 167 std::string GetFileSystemName(const GURL& origin_url, FileSystemType type) {
166 std::string origin_identifier = GetOriginIdentifierFromURL(origin_url); 168 std::string origin_identifier = GetOriginIdentifierFromURL(origin_url);
167 std::string type_string = GetFileSystemTypeString(type); 169 std::string type_string = GetFileSystemTypeString(type);
168 DCHECK(!type_string.empty()); 170 DCHECK(!type_string.empty());
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 310
309 *filesystem_id = filesystem_name.substr(pos + start_token.length(), 311 *filesystem_id = filesystem_name.substr(pos + start_token.length(),
310 std::string::npos); 312 std::string::npos);
311 if (filesystem_id->empty()) 313 if (filesystem_id->empty())
312 return false; 314 return false;
313 315
314 return true; 316 return true;
315 } 317 }
316 318
317 } // namespace fileapi 319 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698