| 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 quota_manager_ = | 136 quota_manager_ = |
| 137 new quota::QuotaManager(false /* is_incognito */, | 137 new quota::QuotaManager(false /* is_incognito */, |
| 138 data_dir_.path(), | 138 data_dir_.path(), |
| 139 base::MessageLoopProxy::current().get(), | 139 base::MessageLoopProxy::current().get(), |
| 140 base::MessageLoopProxy::current().get(), | 140 base::MessageLoopProxy::current().get(), |
| 141 storage_policy_.get()); | 141 storage_policy_.get()); |
| 142 | 142 |
| 143 // Every time we create a new sandbox_file_system helper, | 143 // Every time we create a new sandbox_file_system helper, |
| 144 // it creates another context, which creates another path manager, | 144 // it creates another context, which creates another path manager, |
| 145 // another sandbox_mount_point_provider, and | 145 // another sandbox_backend, and another OFU. |
| 146 // another OFU. We need to pass in the context to skip all that. | 146 // We need to pass in the context to skip all that. |
| 147 file_system_context_ = CreateFileSystemContextForTesting( | 147 file_system_context_ = CreateFileSystemContextForTesting( |
| 148 quota_manager_->proxy(), | 148 quota_manager_->proxy(), |
| 149 data_dir_.path()); | 149 data_dir_.path()); |
| 150 | 150 |
| 151 sandbox_file_system_.SetUp(file_system_context_.get()); | 151 sandbox_file_system_.SetUp(file_system_context_.get()); |
| 152 | 152 |
| 153 change_observers_ = MockFileChangeObserver::CreateList(&change_observer_); | 153 change_observers_ = MockFileChangeObserver::CreateList(&change_observer_); |
| 154 } | 154 } |
| 155 | 155 |
| 156 virtual void TearDown() { | 156 virtual void TearDown() { |
| (...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2321 // Remove isolated. | 2321 // Remove isolated. |
| 2322 storage_policy_->RemoveIsolated(origin_); | 2322 storage_policy_->RemoveIsolated(origin_); |
| 2323 | 2323 |
| 2324 // This should still get the same database. | 2324 // This should still get the same database. |
| 2325 SandboxDirectoryDatabase* db2 = file_util.GetDirectoryDatabase( | 2325 SandboxDirectoryDatabase* db2 = file_util.GetDirectoryDatabase( |
| 2326 origin_, kFileSystemTypePersistent, false /* create */); | 2326 origin_, kFileSystemTypePersistent, false /* create */); |
| 2327 ASSERT_EQ(db, db2); | 2327 ASSERT_EQ(db, db2); |
| 2328 } | 2328 } |
| 2329 | 2329 |
| 2330 } // namespace fileapi | 2330 } // namespace fileapi |
| OLD | NEW |