OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" | 5 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <iterator> | 9 #include <iterator> |
10 #include <utility> | 10 #include <utility> |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 void CannedSyncableFileSystem::SetUp(QuotaMode quota_mode) { | 235 void CannedSyncableFileSystem::SetUp(QuotaMode quota_mode) { |
236 ASSERT_FALSE(is_filesystem_set_up_); | 236 ASSERT_FALSE(is_filesystem_set_up_); |
237 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 237 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
238 | 238 |
239 scoped_refptr<storage::SpecialStoragePolicy> storage_policy = | 239 scoped_refptr<storage::SpecialStoragePolicy> storage_policy = |
240 new content::MockSpecialStoragePolicy(); | 240 new content::MockSpecialStoragePolicy(); |
241 | 241 |
242 if (quota_mode == QUOTA_ENABLED) { | 242 if (quota_mode == QUOTA_ENABLED) { |
243 quota_manager_ = new QuotaManager( | 243 quota_manager_ = new QuotaManager( |
244 false /* is_incognito */, data_dir_.GetPath(), io_task_runner_.get(), | 244 false /* is_incognito */, data_dir_.GetPath(), io_task_runner_.get(), |
245 base::ThreadTaskRunnerHandle::Get().get(), storage_policy.get()); | 245 base::ThreadTaskRunnerHandle::Get().get(), storage_policy.get(), |
| 246 storage::GetQuotaSettingsFunc()); |
246 } | 247 } |
247 | 248 |
248 std::vector<std::string> additional_allowed_schemes; | 249 std::vector<std::string> additional_allowed_schemes; |
249 additional_allowed_schemes.push_back(origin_.scheme()); | 250 additional_allowed_schemes.push_back(origin_.scheme()); |
250 storage::FileSystemOptions options( | 251 storage::FileSystemOptions options( |
251 storage::FileSystemOptions::PROFILE_MODE_NORMAL, | 252 storage::FileSystemOptions::PROFILE_MODE_NORMAL, |
252 additional_allowed_schemes, | 253 additional_allowed_schemes, |
253 env_override_); | 254 env_override_); |
254 | 255 |
255 std::vector<std::unique_ptr<storage::FileSystemBackend>> additional_backends; | 256 std::vector<std::unique_ptr<storage::FileSystemBackend>> additional_backends; |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 sync_status_ = status; | 754 sync_status_ = status; |
754 quit_closure.Run(); | 755 quit_closure.Run(); |
755 } | 756 } |
756 | 757 |
757 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { | 758 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { |
758 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 759 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
759 backend()->sync_context()->sync_status()->AddObserver(this); | 760 backend()->sync_context()->sync_status()->AddObserver(this); |
760 } | 761 } |
761 | 762 |
762 } // namespace sync_file_system | 763 } // namespace sync_file_system |
OLD | NEW |