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

Side by Side Diff: webkit/fileapi/file_system_dir_url_request_job_unittest.cc

Issue 10810053: Enables internal filesystem types via Isolated filesystems (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: layout test crash fix Created 8 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/fileapi/file_system_dir_url_request_job.h" 5 #include "webkit/fileapi/file_system_dir_url_request_job.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 197
198 static void ClearUnusedJob() { 198 static void ClearUnusedJob() {
199 if (job_) { 199 if (job_) {
200 scoped_refptr<net::URLRequestJob> deleter = job_; 200 scoped_refptr<net::URLRequestJob> deleter = job_;
201 job_ = NULL; 201 job_ = NULL;
202 } 202 }
203 } 203 }
204 204
205 FileSystemFileUtil* file_util() { 205 FileSystemFileUtil* file_util() {
206 return file_system_context_->sandbox_provider()->GetFileUtil(); 206 return file_system_context_->sandbox_provider()->GetFileUtil(
207 kFileSystemTypeTemporary);
207 } 208 }
208 209
209 // Put the message loop at the top, so that it's the last thing deleted. 210 // Put the message loop at the top, so that it's the last thing deleted.
210 MessageLoop message_loop_; 211 MessageLoop message_loop_;
211 // Delete all MessageLoopProxy objects before the MessageLoop, to help prevent 212 // Delete all MessageLoopProxy objects before the MessageLoop, to help prevent
212 // leaks caused by tasks posted during shutdown. 213 // leaks caused by tasks posted during shutdown.
213 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; 214 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_;
214 215
215 ScopedTempDir temp_dir_; 216 ScopedTempDir temp_dir_;
216 net::URLRequestContext empty_context_; 217 net::URLRequestContext empty_context_;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 CreateDirectory("foo"); 287 CreateDirectory("foo");
287 TestRequestNoRun(CreateFileSystemURL("foo/")); 288 TestRequestNoRun(CreateFileSystemURL("foo/"));
288 // Run StartAsync() and only StartAsync(). 289 // Run StartAsync() and only StartAsync().
289 MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release()); 290 MessageLoop::current()->DeleteSoon(FROM_HERE, request_.release());
290 MessageLoop::current()->RunAllPending(); 291 MessageLoop::current()->RunAllPending();
291 // If we get here, success! we didn't crash! 292 // If we get here, success! we didn't crash!
292 } 293 }
293 294
294 } // namespace (anonymous) 295 } // namespace (anonymous)
295 } // namespace fileapi 296 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_context.cc ('k') | webkit/fileapi/file_system_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698