| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/tools/test_shell/simple_file_system.h" | 5 #include "webkit/tools/test_shell/simple_file_system.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "base/scoped_callback_factory.h" | 10 #include "base/scoped_callback_factory.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 118 |
| 119 SimpleFileSystem::SimpleFileSystem() { | 119 SimpleFileSystem::SimpleFileSystem() { |
| 120 if (file_system_dir_.CreateUniqueTempDir()) { | 120 if (file_system_dir_.CreateUniqueTempDir()) { |
| 121 file_system_context_ = new FileSystemContext( | 121 file_system_context_ = new FileSystemContext( |
| 122 base::MessageLoopProxy::CreateForCurrentThread(), | 122 base::MessageLoopProxy::CreateForCurrentThread(), |
| 123 base::MessageLoopProxy::CreateForCurrentThread(), | 123 base::MessageLoopProxy::CreateForCurrentThread(), |
| 124 NULL /* special storage policy */, | 124 NULL /* special storage policy */, |
| 125 file_system_dir_.path(), | 125 file_system_dir_.path(), |
| 126 false /* incognito */, | 126 false /* incognito */, |
| 127 true /* allow_file_access */, | 127 true /* allow_file_access */, |
| 128 false /* unlimited_quota */); | 128 true /* unlimited_quota */); |
| 129 } else { | 129 } else { |
| 130 LOG(WARNING) << "Failed to create a temp dir for the filesystem." | 130 LOG(WARNING) << "Failed to create a temp dir for the filesystem." |
| 131 "FileSystem feature will be disabled."; | 131 "FileSystem feature will be disabled."; |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 | 134 |
| 135 SimpleFileSystem::~SimpleFileSystem() { | 135 SimpleFileSystem::~SimpleFileSystem() { |
| 136 } | 136 } |
| 137 | 137 |
| 138 void SimpleFileSystem::OpenFileSystem( | 138 void SimpleFileSystem::OpenFileSystem( |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 FileSystemOperation* SimpleFileSystem::GetNewOperation( | 242 FileSystemOperation* SimpleFileSystem::GetNewOperation( |
| 243 WebFileSystemCallbacks* callbacks) { | 243 WebFileSystemCallbacks* callbacks) { |
| 244 SimpleFileSystemCallbackDispatcher* dispatcher = | 244 SimpleFileSystemCallbackDispatcher* dispatcher = |
| 245 new SimpleFileSystemCallbackDispatcher(AsWeakPtr(), callbacks); | 245 new SimpleFileSystemCallbackDispatcher(AsWeakPtr(), callbacks); |
| 246 FileSystemOperation* operation = new FileSystemOperation( | 246 FileSystemOperation* operation = new FileSystemOperation( |
| 247 dispatcher, base::MessageLoopProxy::CreateForCurrentThread(), | 247 dispatcher, base::MessageLoopProxy::CreateForCurrentThread(), |
| 248 file_system_context_.get()); | 248 file_system_context_.get()); |
| 249 return operation; | 249 return operation; |
| 250 } | 250 } |
| OLD | NEW |