Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/sync_file_system/local/canned_syncable_file_system.cc

Issue 2592793002: Revert of Change how the quota system computes the total poolsize for temporary storage (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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());
247 } 246 }
248 247
249 std::vector<std::string> additional_allowed_schemes; 248 std::vector<std::string> additional_allowed_schemes;
250 additional_allowed_schemes.push_back(origin_.scheme()); 249 additional_allowed_schemes.push_back(origin_.scheme());
251 storage::FileSystemOptions options( 250 storage::FileSystemOptions options(
252 storage::FileSystemOptions::PROFILE_MODE_NORMAL, 251 storage::FileSystemOptions::PROFILE_MODE_NORMAL,
253 additional_allowed_schemes, 252 additional_allowed_schemes,
254 env_override_); 253 env_override_);
255 254
256 ScopedVector<storage::FileSystemBackend> additional_backends; 255 ScopedVector<storage::FileSystemBackend> additional_backends;
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 sync_status_ = status; 753 sync_status_ = status;
755 quit_closure.Run(); 754 quit_closure.Run();
756 } 755 }
757 756
758 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { 757 void CannedSyncableFileSystem::InitializeSyncStatusObserver() {
759 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); 758 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread());
760 backend()->sync_context()->sync_status()->AddObserver(this); 759 backend()->sync_context()->sync_status()->AddObserver(this);
761 } 760 }
762 761
763 } // namespace sync_file_system 762 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698