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

Side by Side Diff: webkit/browser/fileapi/sandbox_file_system_backend_delegate.cc

Issue 145693005: [FileAPI] Replace default leveldb::Env with leveldb::MemEnv in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 months 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 | Annotate | Revision Log
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 "webkit/browser/fileapi/sandbox_file_system_backend_delegate.h" 5 #include "webkit/browser/fileapi/sandbox_file_system_backend_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 quota::QuotaManagerProxy* quota_manager_proxy, 173 quota::QuotaManagerProxy* quota_manager_proxy,
174 base::SequencedTaskRunner* file_task_runner, 174 base::SequencedTaskRunner* file_task_runner,
175 const base::FilePath& profile_path, 175 const base::FilePath& profile_path,
176 quota::SpecialStoragePolicy* special_storage_policy, 176 quota::SpecialStoragePolicy* special_storage_policy,
177 const FileSystemOptions& file_system_options) 177 const FileSystemOptions& file_system_options)
178 : file_task_runner_(file_task_runner), 178 : file_task_runner_(file_task_runner),
179 sandbox_file_util_(new AsyncFileUtilAdapter( 179 sandbox_file_util_(new AsyncFileUtilAdapter(
180 new ObfuscatedFileUtil( 180 new ObfuscatedFileUtil(
181 special_storage_policy, 181 special_storage_policy,
182 profile_path.Append(kFileSystemDirectory), 182 profile_path.Append(kFileSystemDirectory),
183 file_system_options.env_override(),
183 file_task_runner, 184 file_task_runner,
184 base::Bind(&GetTypeStringForURL), 185 base::Bind(&GetTypeStringForURL),
185 GetKnownTypeStrings(), 186 GetKnownTypeStrings(),
186 this))), 187 this))),
187 file_system_usage_cache_(new FileSystemUsageCache(file_task_runner)), 188 file_system_usage_cache_(new FileSystemUsageCache(file_task_runner)),
188 quota_observer_(new SandboxQuotaObserver( 189 quota_observer_(new SandboxQuotaObserver(
189 quota_manager_proxy, 190 quota_manager_proxy,
190 file_task_runner, 191 file_task_runner,
191 obfuscated_file_util(), 192 obfuscated_file_util(),
192 usage_cache())), 193 usage_cache())),
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 654
654 ObfuscatedFileUtil* SandboxFileSystemBackendDelegate::obfuscated_file_util() { 655 ObfuscatedFileUtil* SandboxFileSystemBackendDelegate::obfuscated_file_util() {
655 return static_cast<ObfuscatedFileUtil*>(sync_file_util()); 656 return static_cast<ObfuscatedFileUtil*>(sync_file_util());
656 } 657 }
657 658
658 // Declared in obfuscated_file_util.h. 659 // Declared in obfuscated_file_util.h.
659 // static 660 // static
660 ObfuscatedFileUtil* ObfuscatedFileUtil::CreateForTesting( 661 ObfuscatedFileUtil* ObfuscatedFileUtil::CreateForTesting(
661 quota::SpecialStoragePolicy* special_storage_policy, 662 quota::SpecialStoragePolicy* special_storage_policy,
662 const base::FilePath& file_system_directory, 663 const base::FilePath& file_system_directory,
664 leveldb::Env* env_override,
663 base::SequencedTaskRunner* file_task_runner) { 665 base::SequencedTaskRunner* file_task_runner) {
664 return new ObfuscatedFileUtil(special_storage_policy, 666 return new ObfuscatedFileUtil(special_storage_policy,
665 file_system_directory, 667 file_system_directory,
668 env_override,
666 file_task_runner, 669 file_task_runner,
667 base::Bind(&GetTypeStringForURL), 670 base::Bind(&GetTypeStringForURL),
668 GetKnownTypeStrings(), 671 GetKnownTypeStrings(),
669 NULL); 672 NULL);
670 } 673 }
671 674
672 } // namespace fileapi 675 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/sandbox_directory_database_unittest.cc ('k') | webkit/browser/fileapi/sandbox_origin_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698