| 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/test_mount_point_provider.h" | 5 #include "webkit/fileapi/test_mount_point_provider.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 local_file_util_(new AsyncFileUtilAdapter(new LocalFileUtil())), | 74 local_file_util_(new AsyncFileUtilAdapter(new LocalFileUtil())), |
| 75 quota_util_(new QuotaUtil) { | 75 quota_util_(new QuotaUtil) { |
| 76 UpdateObserverList::Source source; | 76 UpdateObserverList::Source source; |
| 77 source.AddObserver(quota_util_.get(), task_runner_); | 77 source.AddObserver(quota_util_.get(), task_runner_); |
| 78 observers_ = UpdateObserverList(source); | 78 observers_ = UpdateObserverList(source); |
| 79 } | 79 } |
| 80 | 80 |
| 81 TestMountPointProvider::~TestMountPointProvider() { | 81 TestMountPointProvider::~TestMountPointProvider() { |
| 82 } | 82 } |
| 83 | 83 |
| 84 bool TestMountPointProvider::CanHandleType(FileSystemType type) const { |
| 85 return (type == kFileSystemTypeTest); |
| 86 } |
| 87 |
| 84 void TestMountPointProvider::ValidateFileSystemRoot( | 88 void TestMountPointProvider::ValidateFileSystemRoot( |
| 85 const GURL& origin_url, | 89 const GURL& origin_url, |
| 86 FileSystemType type, | 90 FileSystemType type, |
| 87 bool create, | 91 bool create, |
| 88 const ValidateFileSystemCallback& callback) { | 92 const ValidateFileSystemCallback& callback) { |
| 89 // This won't be called unless we add test code that opens a test | 93 // This won't be called unless we add test code that opens a test |
| 90 // filesystem by OpenFileSystem. | 94 // filesystem by OpenFileSystem. |
| 91 NOTREACHED(); | 95 NOTREACHED(); |
| 92 } | 96 } |
| 93 | 97 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 NOTREACHED(); | 178 NOTREACHED(); |
| 175 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); | 179 callback.Run(base::PLATFORM_FILE_ERROR_INVALID_OPERATION); |
| 176 } | 180 } |
| 177 | 181 |
| 178 const UpdateObserverList* TestMountPointProvider::GetUpdateObservers( | 182 const UpdateObserverList* TestMountPointProvider::GetUpdateObservers( |
| 179 FileSystemType type) const { | 183 FileSystemType type) const { |
| 180 return &observers_; | 184 return &observers_; |
| 181 } | 185 } |
| 182 | 186 |
| 183 } // namespace fileapi | 187 } // namespace fileapi |
| OLD | NEW |