OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_path_manager.h" | 5 #include "webkit/fileapi/file_system_path_manager.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 root_path_callback_status_ = false; | 233 root_path_callback_status_ = false; |
234 root_path_.clear(); | 234 root_path_.clear(); |
235 file_system_name_.clear(); | 235 file_system_name_.clear(); |
236 } | 236 } |
237 | 237 |
238 protected: | 238 protected: |
239 FileSystemPathManager* NewPathManager( | 239 FileSystemPathManager* NewPathManager( |
240 bool incognito, | 240 bool incognito, |
241 bool allow_file_access) { | 241 bool allow_file_access) { |
242 FileSystemPathManager* manager = new FileSystemPathManager( | 242 FileSystemPathManager* manager = new FileSystemPathManager( |
243 base::MessageLoopProxy::CreateForCurrentThread(), | 243 base::MessageLoopProxy::current(), |
244 data_dir_.path(), | 244 data_dir_.path(), |
245 scoped_refptr<quota::SpecialStoragePolicy>( | 245 scoped_refptr<quota::SpecialStoragePolicy>( |
246 new TestSpecialStoragePolicy()), | 246 new TestSpecialStoragePolicy()), |
247 incognito, | 247 incognito, |
248 allow_file_access); | 248 allow_file_access); |
249 #if defined(OS_CHROMEOS) | 249 #if defined(OS_CHROMEOS) |
250 fileapi::ExternalFileSystemMountPointProvider* ext_provider = | 250 fileapi::ExternalFileSystemMountPointProvider* ext_provider = |
251 manager->external_provider(); | 251 manager->external_provider(); |
252 ext_provider->AddMountPoint(FilePath("/tmp/testing")); | 252 ext_provider->AddMountPoint(FilePath("/tmp/testing")); |
253 #endif | 253 #endif |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kIsRestrictedNameTestCases); ++i) { | 433 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kIsRestrictedNameTestCases); ++i) { |
434 SCOPED_TRACE(testing::Message() << "IsRestrictedName #" << i << " " | 434 SCOPED_TRACE(testing::Message() << "IsRestrictedName #" << i << " " |
435 << kIsRestrictedNameTestCases[i].name); | 435 << kIsRestrictedNameTestCases[i].name); |
436 FilePath name(kIsRestrictedNameTestCases[i].name); | 436 FilePath name(kIsRestrictedNameTestCases[i].name); |
437 EXPECT_EQ(kIsRestrictedNameTestCases[i].expected_dangerous, | 437 EXPECT_EQ(kIsRestrictedNameTestCases[i].expected_dangerous, |
438 manager->IsRestrictedFileName(kFileSystemTypeTemporary, name)); | 438 manager->IsRestrictedFileName(kFileSystemTypeTemporary, name)); |
439 } | 439 } |
440 } | 440 } |
441 | 441 |
442 } // namespace fileapi | 442 } // namespace fileapi |
OLD | NEW |