| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stdint.h> | 5 #include <stdint.h> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 delegate_->set_quit_on_redirect(true); | 178 delegate_->set_quit_on_redirect(true); |
| 179 job_factory_.reset(new FileSystemDirURLRequestJobFactory( | 179 job_factory_.reset(new FileSystemDirURLRequestJobFactory( |
| 180 url.GetOrigin().host(), file_system_context)); | 180 url.GetOrigin().host(), file_system_context)); |
| 181 empty_context_.set_job_factory(job_factory_.get()); | 181 empty_context_.set_job_factory(job_factory_.get()); |
| 182 | 182 |
| 183 request_ = empty_context_.CreateRequest( | 183 request_ = empty_context_.CreateRequest( |
| 184 url, net::DEFAULT_PRIORITY, delegate_.get()); | 184 url, net::DEFAULT_PRIORITY, delegate_.get()); |
| 185 request_->Start(); | 185 request_->Start(); |
| 186 ASSERT_TRUE(request_->is_pending()); // verify that we're starting async | 186 ASSERT_TRUE(request_->is_pending()); // verify that we're starting async |
| 187 if (run_to_completion) | 187 if (run_to_completion) |
| 188 base::MessageLoop::current()->Run(); | 188 base::RunLoop().Run(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void TestRequest(const GURL& url) { | 191 void TestRequest(const GURL& url) { |
| 192 TestRequestHelper(url, true, file_system_context_.get()); | 192 TestRequestHelper(url, true, file_system_context_.get()); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void TestRequestWithContext(const GURL& url, | 195 void TestRequestWithContext(const GURL& url, |
| 196 FileSystemContext* file_system_context) { | 196 FileSystemContext* file_system_context) { |
| 197 TestRequestHelper(url, true, file_system_context); | 197 TestRequestHelper(url, true, file_system_context); |
| 198 } | 198 } |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 ASSERT_FALSE(request_->status().is_success()); | 455 ASSERT_FALSE(request_->status().is_success()); |
| 456 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error()); | 456 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error()); |
| 457 | 457 |
| 458 ASSERT_FALSE( | 458 ASSERT_FALSE( |
| 459 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( | 459 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( |
| 460 kValidExternalMountPoint)); | 460 kValidExternalMountPoint)); |
| 461 } | 461 } |
| 462 | 462 |
| 463 } // namespace | 463 } // namespace |
| 464 } // namespace content | 464 } // namespace content |
| OLD | NEW |