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

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

Issue 15716007: Split webkit_storage target into webkit_storage_{browser,common,renderer} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export fix Created 7 years, 6 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/common/fileapi/file_system_util.h" 5 #include "webkit/common/fileapi/file_system_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/strings/sys_string_conversions.h" 12 #include "base/strings/sys_string_conversions.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
15 #include "webkit/base/origin_url_conversions.h" 15 #include "webkit/base/origin_url_conversions.h"
16 16
17 namespace fileapi { 17 namespace fileapi {
18 18
19 const char kPersistentDir[] = "/persistent"; 19 const char* kPersistentDir = "/persistent";
jamesr 2013/06/10 22:07:21 this seems like a slight change for the worse - if
20 const char kTemporaryDir[] = "/temporary"; 20 const char* kTemporaryDir = "/temporary";
21 const char kIsolatedDir[] = "/isolated"; 21 const char* kIsolatedDir = "/isolated";
22 const char kExternalDir[] = "/external"; 22 const char* kExternalDir = "/external";
23 const char kTestDir[] = "/test"; 23 const char* kTestDir = "/test";
24 24
25 const base::FilePath::CharType VirtualPath::kRoot[] = FILE_PATH_LITERAL("/"); 25 const base::FilePath::CharType VirtualPath::kRoot[] = FILE_PATH_LITERAL("/");
26 const base::FilePath::CharType VirtualPath::kSeparator = FILE_PATH_LITERAL('/'); 26 const base::FilePath::CharType VirtualPath::kSeparator = FILE_PATH_LITERAL('/');
27 27
28 // TODO(ericu): Consider removing support for '\', even on Windows, if possible. 28 // TODO(ericu): Consider removing support for '\', even on Windows, if possible.
29 // There's a lot of test code that will need reworking, and we may have trouble 29 // There's a lot of test code that will need reworking, and we may have trouble
30 // with base::FilePath elsewhere [e.g. DirName and other methods may also need 30 // with base::FilePath elsewhere [e.g. DirName and other methods may also need
31 // replacement]. 31 // replacement].
32 base::FilePath VirtualPath::BaseName(const base::FilePath& virtual_path) { 32 base::FilePath VirtualPath::BaseName(const base::FilePath& virtual_path) {
33 base::FilePath::StringType path = virtual_path.value(); 33 base::FilePath::StringType path = virtual_path.value();
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 std::string root = GetFileSystemRootURI(origin_url, 363 std::string root = GetFileSystemRootURI(origin_url,
364 kFileSystemTypeExternal).spec(); 364 kFileSystemTypeExternal).spec();
365 if (base::FilePath::FromUTF8Unsafe(mount_name).ReferencesParent()) 365 if (base::FilePath::FromUTF8Unsafe(mount_name).ReferencesParent())
366 return std::string(); 366 return std::string();
367 root.append(mount_name); 367 root.append(mount_name);
368 root.append("/"); 368 root.append("/");
369 return root; 369 return root;
370 } 370 }
371 371
372 } // namespace fileapi 372 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/common/fileapi/file_system_util.h ('k') | webkit/common/fileapi/webkit_common_fileapi.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698