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 "webkit/fileapi/local_file_system_test_helper.h" | 5 #include "webkit/fileapi/local_file_system_test_helper.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 return local_path; | 107 return local_path; |
108 } | 108 } |
109 | 109 |
110 base::FilePath LocalFileSystemTestOriginHelper::GetLocalPathFromASCII( | 110 base::FilePath LocalFileSystemTestOriginHelper::GetLocalPathFromASCII( |
111 const std::string& path) { | 111 const std::string& path) { |
112 return GetLocalPath(base::FilePath().AppendASCII(path)); | 112 return GetLocalPath(base::FilePath().AppendASCII(path)); |
113 } | 113 } |
114 | 114 |
115 base::FilePath LocalFileSystemTestOriginHelper::GetUsageCachePath() const { | 115 base::FilePath LocalFileSystemTestOriginHelper::GetUsageCachePath() const { |
116 if (type_ != kFileSystemTypeTemporary && | 116 if (type_ != kFileSystemTypeTemporary && |
117 type_ != kFileSystemTypePersistent) | 117 type_ != kFileSystemTypePersistent && |
| 118 type_ != kFileSystemTypeSyncable) |
118 return base::FilePath(); | 119 return base::FilePath(); |
119 return file_system_context_-> | 120 return file_system_context_-> |
120 sandbox_provider()->GetUsageCachePathForOriginAndType(origin_, type_); | 121 sandbox_provider()->GetUsageCachePathForOriginAndType(origin_, type_); |
121 } | 122 } |
122 | 123 |
123 FileSystemURL LocalFileSystemTestOriginHelper::CreateURL( | 124 FileSystemURL LocalFileSystemTestOriginHelper::CreateURL( |
124 const base::FilePath& path) const { | 125 const base::FilePath& path) const { |
125 return file_system_context_->CreateCrackedFileSystemURL(origin_, type_, path); | 126 return file_system_context_->CreateCrackedFileSystemURL(origin_, type_, path); |
126 } | 127 } |
127 | 128 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 type_, | 177 type_, |
177 new TestMountPointProvider( | 178 new TestMountPointProvider( |
178 file_system_context_->task_runners()->file_task_runner(), | 179 file_system_context_->task_runners()->file_task_runner(), |
179 file_system_context_->partition_path())); | 180 file_system_context_->partition_path())); |
180 } | 181 } |
181 file_util_ = file_system_context_->GetFileUtil(type_); | 182 file_util_ = file_system_context_->GetFileUtil(type_); |
182 DCHECK(file_util_); | 183 DCHECK(file_util_); |
183 } | 184 } |
184 | 185 |
185 } // namespace fileapi | 186 } // namespace fileapi |
OLD | NEW |