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

Side by Side Diff: webkit/browser/fileapi/plugin_private_file_system_backend.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/plugin_private_file_system_backend.h" 5 #include "webkit/browser/fileapi/plugin_private_file_system_backend.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 const FileSystemOptions& file_system_options) 91 const FileSystemOptions& file_system_options)
92 : file_task_runner_(file_task_runner), 92 : file_task_runner_(file_task_runner),
93 file_system_options_(file_system_options), 93 file_system_options_(file_system_options),
94 base_path_(profile_path.Append( 94 base_path_(profile_path.Append(
95 kFileSystemDirectory).Append(kPluginPrivateDirectory)), 95 kFileSystemDirectory).Append(kPluginPrivateDirectory)),
96 plugin_map_(new FileSystemIDToPluginMap(file_task_runner)), 96 plugin_map_(new FileSystemIDToPluginMap(file_task_runner)),
97 weak_factory_(this) { 97 weak_factory_(this) {
98 file_util_.reset( 98 file_util_.reset(
99 new AsyncFileUtilAdapter(new ObfuscatedFileUtil( 99 new AsyncFileUtilAdapter(new ObfuscatedFileUtil(
100 special_storage_policy, 100 special_storage_policy,
101 base_path_, 101 base_path_, file_system_options.env_override(),
102 file_task_runner, 102 file_task_runner,
103 base::Bind(&FileSystemIDToPluginMap::GetPluginIDForURL, 103 base::Bind(&FileSystemIDToPluginMap::GetPluginIDForURL,
104 base::Owned(plugin_map_)), 104 base::Owned(plugin_map_)),
105 std::set<std::string>(), 105 std::set<std::string>(),
106 NULL))); 106 NULL)));
107 } 107 }
108 108
109 PluginPrivateFileSystemBackend::~PluginPrivateFileSystemBackend() { 109 PluginPrivateFileSystemBackend::~PluginPrivateFileSystemBackend() {
110 if (!file_task_runner_->RunsTasksOnCurrentThread()) { 110 if (!file_task_runner_->RunsTasksOnCurrentThread()) {
111 AsyncFileUtil* file_util = file_util_.release(); 111 AsyncFileUtil* file_util = file_util_.release();
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 FileSystemType type) const { 288 FileSystemType type) const {
289 return NULL; 289 return NULL;
290 } 290 }
291 291
292 ObfuscatedFileUtil* PluginPrivateFileSystemBackend::obfuscated_file_util() { 292 ObfuscatedFileUtil* PluginPrivateFileSystemBackend::obfuscated_file_util() {
293 return static_cast<ObfuscatedFileUtil*>( 293 return static_cast<ObfuscatedFileUtil*>(
294 static_cast<AsyncFileUtilAdapter*>(file_util_.get())->sync_file_util()); 294 static_cast<AsyncFileUtilAdapter*>(file_util_.get())->sync_file_util());
295 } 295 }
296 296
297 } // namespace fileapi 297 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/obfuscated_file_util.cc ('k') | webkit/browser/fileapi/quota/quota_backend_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698