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

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

Issue 15754005: Fix dependency: make file_system_util not depend on FileSystemURL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « webkit/fileapi/file_system_util.h ('k') | webkit/fileapi/file_system_util_unittest.cc » ('j') | 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/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/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h" 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebCString.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
18 #include "webkit/base/origin_url_conversions.h" 18 #include "webkit/base/origin_url_conversions.h"
19 #include "webkit/fileapi/file_system_url.h"
20 19
21 namespace fileapi { 20 namespace fileapi {
22 21
23 const char kPersistentDir[] = "/persistent"; 22 const char kPersistentDir[] = "/persistent";
24 const char kTemporaryDir[] = "/temporary"; 23 const char kTemporaryDir[] = "/temporary";
25 const char kIsolatedDir[] = "/isolated"; 24 const char kIsolatedDir[] = "/isolated";
26 const char kExternalDir[] = "/external"; 25 const char kExternalDir[] = "/external";
27 const char kTestDir[] = "/test"; 26 const char kTestDir[] = "/test";
28 27
29 const base::FilePath::CharType VirtualPath::kRoot[] = FILE_PATH_LITERAL("/"); 28 const base::FilePath::CharType VirtualPath::kRoot[] = FILE_PATH_LITERAL("/");
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 root.append("/"); 351 root.append("/");
353 if (!optional_root_name.empty()) { 352 if (!optional_root_name.empty()) {
354 if (base::FilePath::FromUTF8Unsafe(optional_root_name).ReferencesParent()) 353 if (base::FilePath::FromUTF8Unsafe(optional_root_name).ReferencesParent())
355 return std::string(); 354 return std::string();
356 root.append(optional_root_name); 355 root.append(optional_root_name);
357 root.append("/"); 356 root.append("/");
358 } 357 }
359 return root; 358 return root;
360 } 359 }
361 360
362 bool AreSameFileSystem(const FileSystemURL& url1, const FileSystemURL& url2) {
363 return url1.origin() == url2.origin() && url1.type() == url2.type();
364 }
365
366 } // namespace fileapi 361 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_util.h ('k') | webkit/fileapi/file_system_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698