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 10825042: Implement media path filter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
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: 159 case kFileSystemTypeDragged:
160 case kFileSystemTypeNativeMedia:
161 case kFileSystemTypeDeviceMedia:
160 NOTREACHED(); 162 NOTREACHED();
161 } 163 }
162 NOTREACHED(); 164 NOTREACHED();
163 return GURL(); 165 return GURL();
164 } 166 }
165 167
166 std::string GetFileSystemName(const GURL& origin_url, FileSystemType type) { 168 std::string GetFileSystemName(const GURL& origin_url, FileSystemType type) {
167 std::string origin_identifier = GetOriginIdentifierFromURL(origin_url); 169 std::string origin_identifier = GetOriginIdentifierFromURL(origin_url);
168 std::string type_string = GetFileSystemTypeString(type); 170 std::string type_string = GetFileSystemTypeString(type);
169 DCHECK(!type_string.empty()); 171 DCHECK(!type_string.empty());
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 311
310 *filesystem_id = filesystem_name.substr(pos + start_token.length(), 312 *filesystem_id = filesystem_name.substr(pos + start_token.length(),
311 std::string::npos); 313 std::string::npos);
312 if (filesystem_id->empty()) 314 if (filesystem_id->empty())
313 return false; 315 return false;
314 316
315 return true; 317 return true;
316 } 318 }
317 319
318 } // namespace fileapi 320 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698