| OLD | NEW |
| 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 virtual ~TestProtocolHandler() {} | 694 virtual ~TestProtocolHandler() {} |
| 695 | 695 |
| 696 virtual net::URLRequestJob* MaybeCreateJob( | 696 virtual net::URLRequestJob* MaybeCreateJob( |
| 697 net::URLRequest* request, | 697 net::URLRequest* request, |
| 698 net::NetworkDelegate* network_delegate) const OVERRIDE { | 698 net::NetworkDelegate* network_delegate) const OVERRIDE { |
| 699 return new webkit_blob::BlobURLRequestJob( | 699 return new webkit_blob::BlobURLRequestJob( |
| 700 request, | 700 request, |
| 701 network_delegate, | 701 network_delegate, |
| 702 blob_storage_controller_->GetBlobDataFromUrl(request->url()), | 702 blob_storage_controller_->GetBlobDataFromUrl(request->url()), |
| 703 file_system_context_, | 703 file_system_context_, |
| 704 base::MessageLoopProxy::current()); | 704 base::MessageLoopProxy::current().get()); |
| 705 } | 705 } |
| 706 | 706 |
| 707 private: | 707 private: |
| 708 webkit_blob::BlobStorageController* const blob_storage_controller_; | 708 webkit_blob::BlobStorageController* const blob_storage_controller_; |
| 709 fileapi::FileSystemContext* const file_system_context_; | 709 fileapi::FileSystemContext* const file_system_context_; |
| 710 | 710 |
| 711 DISALLOW_COPY_AND_ASSIGN(TestProtocolHandler); | 711 DISALLOW_COPY_AND_ASSIGN(TestProtocolHandler); |
| 712 }; | 712 }; |
| 713 | 713 |
| 714 class TestURLRequestContext : public net::URLRequestContext { | 714 class TestURLRequestContext : public net::URLRequestContext { |
| (...skipping 2781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3496 DownloadsApiTest() {} | 3496 DownloadsApiTest() {} |
| 3497 virtual ~DownloadsApiTest() {} | 3497 virtual ~DownloadsApiTest() {} |
| 3498 private: | 3498 private: |
| 3499 DISALLOW_COPY_AND_ASSIGN(DownloadsApiTest); | 3499 DISALLOW_COPY_AND_ASSIGN(DownloadsApiTest); |
| 3500 }; | 3500 }; |
| 3501 | 3501 |
| 3502 | 3502 |
| 3503 IN_PROC_BROWSER_TEST_F(DownloadsApiTest, DownloadsApiTest) { | 3503 IN_PROC_BROWSER_TEST_F(DownloadsApiTest, DownloadsApiTest) { |
| 3504 ASSERT_TRUE(RunExtensionTest("downloads")) << message_; | 3504 ASSERT_TRUE(RunExtensionTest("downloads")) << message_; |
| 3505 } | 3505 } |
| OLD | NEW |