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

Side by Side Diff: webkit/tools/test_shell/simple_file_system.cc

Issue 9004019: Cleanup: Removing FileSystemPathManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 years, 11 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/memory/scoped_callback_factory.h" 8 #include "base/memory/scoped_callback_factory.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback s.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback s.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemEntry.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemEntry.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" 20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" 21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
22 #include "webkit/fileapi/file_system_callback_dispatcher.h" 22 #include "webkit/fileapi/file_system_callback_dispatcher.h"
23 #include "webkit/fileapi/file_system_context.h" 23 #include "webkit/fileapi/file_system_context.h"
24 #include "webkit/fileapi/file_system_operation.h" 24 #include "webkit/fileapi/file_system_operation.h"
25 #include "webkit/fileapi/file_system_path_manager.h"
26 #include "webkit/fileapi/file_system_types.h" 25 #include "webkit/fileapi/file_system_types.h"
26 #include "webkit/fileapi/mock_file_system_options.h"
27 #include "webkit/glue/webkit_glue.h" 27 #include "webkit/glue/webkit_glue.h"
28 #include "webkit/tools/test_shell/simple_file_writer.h" 28 #include "webkit/tools/test_shell/simple_file_writer.h"
29 29
30 using base::WeakPtr; 30 using base::WeakPtr;
31 31
32 using WebKit::WebFileInfo; 32 using WebKit::WebFileInfo;
33 using WebKit::WebFileSystem; 33 using WebKit::WebFileSystem;
34 using WebKit::WebFileSystemCallbacks; 34 using WebKit::WebFileSystemCallbacks;
35 using WebKit::WebFileSystemEntry; 35 using WebKit::WebFileSystemEntry;
36 using WebKit::WebFileWriter; 36 using WebKit::WebFileWriter;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } // namespace 122 } // namespace
123 123
124 SimpleFileSystem::SimpleFileSystem() { 124 SimpleFileSystem::SimpleFileSystem() {
125 if (file_system_dir_.CreateUniqueTempDir()) { 125 if (file_system_dir_.CreateUniqueTempDir()) {
126 file_system_context_ = new FileSystemContext( 126 file_system_context_ = new FileSystemContext(
127 base::MessageLoopProxy::current(), 127 base::MessageLoopProxy::current(),
128 base::MessageLoopProxy::current(), 128 base::MessageLoopProxy::current(),
129 NULL /* special storage policy */, 129 NULL /* special storage policy */,
130 NULL /* quota manager */, 130 NULL /* quota manager */,
131 file_system_dir_.path(), 131 file_system_dir_.path(),
132 false /* incognito */, 132 fileapi::CreateAllowFileAccessOptions());
133 true /* allow_file_access */,
134 NULL);
135 } else { 133 } else {
136 LOG(WARNING) << "Failed to create a temp dir for the filesystem." 134 LOG(WARNING) << "Failed to create a temp dir for the filesystem."
137 "FileSystem feature will be disabled."; 135 "FileSystem feature will be disabled.";
138 } 136 }
139 } 137 }
140 138
141 SimpleFileSystem::~SimpleFileSystem() { 139 SimpleFileSystem::~SimpleFileSystem() {
142 } 140 }
143 141
144 void SimpleFileSystem::OpenFileSystem( 142 void SimpleFileSystem::OpenFileSystem(
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 225
228 FileSystemOperation* SimpleFileSystem::GetNewOperation( 226 FileSystemOperation* SimpleFileSystem::GetNewOperation(
229 WebFileSystemCallbacks* callbacks) { 227 WebFileSystemCallbacks* callbacks) {
230 SimpleFileSystemCallbackDispatcher* dispatcher = 228 SimpleFileSystemCallbackDispatcher* dispatcher =
231 new SimpleFileSystemCallbackDispatcher(AsWeakPtr(), callbacks); 229 new SimpleFileSystemCallbackDispatcher(AsWeakPtr(), callbacks);
232 FileSystemOperation* operation = new FileSystemOperation( 230 FileSystemOperation* operation = new FileSystemOperation(
233 dispatcher, base::MessageLoopProxy::current(), 231 dispatcher, base::MessageLoopProxy::current(),
234 file_system_context_.get()); 232 file_system_context_.get());
235 return operation; 233 return operation;
236 } 234 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698