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

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

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 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
« no previous file with comments | « webkit/quota/quota_task.cc ('k') | webkit/tools/test_shell/simple_file_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 private: 125 private:
126 WeakPtr<SimpleFileSystem> file_system_; 126 WeakPtr<SimpleFileSystem> file_system_;
127 WebFileSystemCallbacks* callbacks_; 127 WebFileSystemCallbacks* callbacks_;
128 }; 128 };
129 129
130 } // namespace 130 } // namespace
131 131
132 SimpleFileSystem::SimpleFileSystem() { 132 SimpleFileSystem::SimpleFileSystem() {
133 if (file_system_dir_.CreateUniqueTempDir()) { 133 if (file_system_dir_.CreateUniqueTempDir()) {
134 file_system_context_ = new FileSystemContext( 134 file_system_context_ = new FileSystemContext(
135 base::MessageLoopProxy::CreateForCurrentThread(), 135 base::MessageLoopProxy::current(),
136 base::MessageLoopProxy::CreateForCurrentThread(), 136 base::MessageLoopProxy::current(),
137 NULL /* special storage policy */, 137 NULL /* special storage policy */,
138 NULL /* quota manager */, 138 NULL /* quota manager */,
139 file_system_dir_.path(), 139 file_system_dir_.path(),
140 false /* incognito */, 140 false /* incognito */,
141 true /* allow_file_access */, 141 true /* allow_file_access */,
142 true /* unlimited_quota */, 142 true /* unlimited_quota */,
143 NULL); 143 NULL);
144 } else { 144 } else {
145 LOG(WARNING) << "Failed to create a temp dir for the filesystem." 145 LOG(WARNING) << "Failed to create a temp dir for the filesystem."
146 "FileSystem feature will be disabled."; 146 "FileSystem feature will be disabled.";
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 WebFileWriter* SimpleFileSystem::createFileWriter( 291 WebFileWriter* SimpleFileSystem::createFileWriter(
292 const WebURL& path, WebFileWriterClient* client) { 292 const WebURL& path, WebFileWriterClient* client) {
293 return new SimpleFileWriter(path, client, file_system_context_.get()); 293 return new SimpleFileWriter(path, client, file_system_context_.get());
294 } 294 }
295 295
296 FileSystemOperation* SimpleFileSystem::GetNewOperation( 296 FileSystemOperation* SimpleFileSystem::GetNewOperation(
297 WebFileSystemCallbacks* callbacks) { 297 WebFileSystemCallbacks* callbacks) {
298 SimpleFileSystemCallbackDispatcher* dispatcher = 298 SimpleFileSystemCallbackDispatcher* dispatcher =
299 new SimpleFileSystemCallbackDispatcher(AsWeakPtr(), callbacks); 299 new SimpleFileSystemCallbackDispatcher(AsWeakPtr(), callbacks);
300 FileSystemOperation* operation = new FileSystemOperation( 300 FileSystemOperation* operation = new FileSystemOperation(
301 dispatcher, base::MessageLoopProxy::CreateForCurrentThread(), 301 dispatcher, base::MessageLoopProxy::current(),
302 file_system_context_.get(), NULL); 302 file_system_context_.get(), NULL);
303 return operation; 303 return operation;
304 } 304 }
OLDNEW
« no previous file with comments | « webkit/quota/quota_task.cc ('k') | webkit/tools/test_shell/simple_file_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698