| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/browser/loader/resource_loader.h" | 5 #include "content/browser/loader/resource_loader.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 void Resume() { | 125 void Resume() { |
| 126 controller()->Resume(); | 126 controller()->Resume(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 // ResourceHandler implementation: | 129 // ResourceHandler implementation: |
| 130 virtual bool OnUploadProgress(uint64 position, uint64 size) OVERRIDE { | 130 virtual bool OnUploadProgress(uint64 position, uint64 size) OVERRIDE { |
| 131 NOTREACHED(); | 131 NOTREACHED(); |
| 132 return true; | 132 return true; |
| 133 } | 133 } |
| 134 | 134 |
| 135 virtual bool OnRequestRedirected(const GURL& url, | 135 virtual bool OnRequestRedirected(const net::RedirectInfo& redirect_info, |
| 136 ResourceResponse* response, | 136 ResourceResponse* response, |
| 137 bool* defer) OVERRIDE { | 137 bool* defer) OVERRIDE { |
| 138 NOTREACHED(); | 138 NOTREACHED(); |
| 139 return true; | 139 return true; |
| 140 } | 140 } |
| 141 | 141 |
| 142 virtual bool OnResponseStarted(ResourceResponse* response, | 142 virtual bool OnResponseStarted(ResourceResponse* response, |
| 143 bool* defer) OVERRIDE { | 143 bool* defer) OVERRIDE { |
| 144 EXPECT_FALSE(response_); | 144 EXPECT_FALSE(response_); |
| 145 response_ = response; | 145 response_ = response; |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents)); | 721 ASSERT_TRUE(base::ReadFileToString(temp_path(), &contents)); |
| 722 EXPECT_EQ(test_data(), contents); | 722 EXPECT_EQ(test_data(), contents); |
| 723 | 723 |
| 724 // Release the loader. The file should be gone now. | 724 // Release the loader. The file should be gone now. |
| 725 ReleaseLoader(); | 725 ReleaseLoader(); |
| 726 base::RunLoop().RunUntilIdle(); | 726 base::RunLoop().RunUntilIdle(); |
| 727 EXPECT_FALSE(base::PathExists(temp_path())); | 727 EXPECT_FALSE(base::PathExists(temp_path())); |
| 728 } | 728 } |
| 729 | 729 |
| 730 } // namespace content | 730 } // namespace content |
| OLD | NEW |