OLD | NEW |
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 "storage/browser/fileapi/file_system_url.h" | 5 #include "storage/browser/fileapi/file_system_url.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 FileSystemURL FileSystemURL::CreateForTest(const GURL& url) { | 29 FileSystemURL FileSystemURL::CreateForTest(const GURL& url) { |
30 return FileSystemURL(url); | 30 return FileSystemURL(url); |
31 } | 31 } |
32 | 32 |
33 FileSystemURL FileSystemURL::CreateForTest(const GURL& origin, | 33 FileSystemURL FileSystemURL::CreateForTest(const GURL& origin, |
34 FileSystemType mount_type, | 34 FileSystemType mount_type, |
35 const base::FilePath& virtual_path) { | 35 const base::FilePath& virtual_path) { |
36 return FileSystemURL(origin, mount_type, virtual_path); | 36 return FileSystemURL(origin, mount_type, virtual_path); |
37 } | 37 } |
38 | 38 |
| 39 FileSystemURL FileSystemURL::CreateForTest( |
| 40 const GURL& origin, |
| 41 FileSystemType mount_type, |
| 42 const base::FilePath& virtual_path, |
| 43 const std::string& mount_filesystem_id, |
| 44 FileSystemType cracked_type, |
| 45 const base::FilePath& cracked_path, |
| 46 const std::string& filesystem_id, |
| 47 const FileSystemMountOption& mount_option) { |
| 48 return FileSystemURL(origin, |
| 49 mount_type, |
| 50 virtual_path, |
| 51 mount_filesystem_id, |
| 52 cracked_type, |
| 53 cracked_path, |
| 54 filesystem_id, |
| 55 mount_option); |
| 56 } |
| 57 |
39 FileSystemURL::FileSystemURL(const GURL& url) | 58 FileSystemURL::FileSystemURL(const GURL& url) |
40 : mount_type_(kFileSystemTypeUnknown), | 59 : mount_type_(kFileSystemTypeUnknown), |
41 type_(kFileSystemTypeUnknown), | 60 type_(kFileSystemTypeUnknown), |
42 mount_option_(COPY_SYNC_OPTION_NO_SYNC) { | 61 mount_option_(COPY_SYNC_OPTION_NO_SYNC) { |
43 is_valid_ = ParseFileSystemSchemeURL(url, &origin_, &mount_type_, | 62 is_valid_ = ParseFileSystemSchemeURL(url, &origin_, &mount_type_, |
44 &virtual_path_); | 63 &virtual_path_); |
45 path_ = virtual_path_; | 64 path_ = virtual_path_; |
46 type_ = mount_type_; | 65 type_ = mount_type_; |
47 } | 66 } |
48 | 67 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 if (lhs.origin_ != rhs.origin_) | 163 if (lhs.origin_ != rhs.origin_) |
145 return lhs.origin_ < rhs.origin_; | 164 return lhs.origin_ < rhs.origin_; |
146 if (lhs.type_ != rhs.type_) | 165 if (lhs.type_ != rhs.type_) |
147 return lhs.type_ < rhs.type_; | 166 return lhs.type_ < rhs.type_; |
148 if (lhs.filesystem_id_ != rhs.filesystem_id_) | 167 if (lhs.filesystem_id_ != rhs.filesystem_id_) |
149 return lhs.filesystem_id_ < rhs.filesystem_id_; | 168 return lhs.filesystem_id_ < rhs.filesystem_id_; |
150 return lhs.path_ < rhs.path_; | 169 return lhs.path_ < rhs.path_; |
151 } | 170 } |
152 | 171 |
153 } // namespace storage | 172 } // namespace storage |
OLD | NEW |