OLD | NEW |
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 // NOTE: These tests are run as part of "unit_tests" (in chrome/test/unit) | 5 // NOTE: These tests are run as part of "unit_tests" (in chrome/test/unit) |
6 // rather than as part of test_shell_tests because they rely on being able | 6 // rather than as part of test_shell_tests because they rely on being able |
7 // to instantiate a MessageLoop of type TYPE_IO. test_shell_tests uses | 7 // to instantiate a MessageLoop of type TYPE_IO. test_shell_tests uses |
8 // TYPE_UI, which URLRequest doesn't allow. | 8 // TYPE_UI, which URLRequest doesn't allow. |
9 // | 9 // |
10 | 10 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 net::URLRequest* request, | 195 net::URLRequest* request, |
196 const std::string& scheme) { | 196 const std::string& scheme) { |
197 DCHECK(job_); | 197 DCHECK(job_); |
198 net::URLRequestJob* temp = job_; | 198 net::URLRequestJob* temp = job_; |
199 job_ = NULL; | 199 job_ = NULL; |
200 return temp; | 200 return temp; |
201 } | 201 } |
202 | 202 |
203 FileSystemFileUtil* file_util() { | 203 FileSystemFileUtil* file_util() { |
204 return file_system_context_->path_manager()->sandbox_provider()-> | 204 return file_system_context_->path_manager()->sandbox_provider()-> |
205 GetFileSystemFileUtil(); | 205 GetFileUtil(); |
206 } | 206 } |
207 | 207 |
208 // Put the message loop at the top, so that it's the last thing deleted. | 208 // Put the message loop at the top, so that it's the last thing deleted. |
209 MessageLoop message_loop_; | 209 MessageLoop message_loop_; |
210 // Delete all MessageLoopProxy objects before the MessageLoop, to help prevent | 210 // Delete all MessageLoopProxy objects before the MessageLoop, to help prevent |
211 // leaks caused by tasks posted during shutdown. | 211 // leaks caused by tasks posted during shutdown. |
212 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; | 212 scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; |
213 | 213 |
214 ScopedTempDir temp_dir_; | 214 ScopedTempDir temp_dir_; |
215 FilePath root_path_; | 215 FilePath root_path_; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 MessageLoop::current()->PostTask(FROM_HERE, new QuitNowTask); | 295 MessageLoop::current()->PostTask(FROM_HERE, new QuitNowTask); |
296 MessageLoop::current()->Run(); | 296 MessageLoop::current()->Run(); |
297 | 297 |
298 request_.reset(); | 298 request_.reset(); |
299 MessageLoop::current()->RunAllPending(); | 299 MessageLoop::current()->RunAllPending(); |
300 // If we get here, success! we didn't crash! | 300 // If we get here, success! we didn't crash! |
301 } | 301 } |
302 | 302 |
303 } // namespace (anonymous) | 303 } // namespace (anonymous) |
304 } // namespace fileapi | 304 } // namespace fileapi |
OLD | NEW |