| 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 } | 212 } |
| 213 | 213 |
| 214 net::URLRequestJob* MaybeCreateJobWithProtocolHandler( | 214 net::URLRequestJob* MaybeCreateJobWithProtocolHandler( |
| 215 const std::string& scheme, | 215 const std::string& scheme, |
| 216 net::URLRequest* request, | 216 net::URLRequest* request, |
| 217 net::NetworkDelegate* network_delegate) const override { | 217 net::NetworkDelegate* network_delegate) const override { |
| 218 return new FileWriterDelegateTestJob( | 218 return new FileWriterDelegateTestJob( |
| 219 request, network_delegate, *content_data_); | 219 request, network_delegate, *content_data_); |
| 220 } | 220 } |
| 221 | 221 |
| 222 net::URLRequestJob* MaybeInterceptRedirect( |
| 223 net::URLRequest* request, |
| 224 net::NetworkDelegate* network_delegate, |
| 225 const GURL& location) const override { |
| 226 return NULL; |
| 227 } |
| 228 |
| 229 net::URLRequestJob* MaybeInterceptResponse( |
| 230 net::URLRequest* request, |
| 231 net::NetworkDelegate* network_delegate) const override { |
| 232 return NULL; |
| 233 } |
| 234 |
| 222 bool IsHandledProtocol(const std::string& scheme) const override { | 235 bool IsHandledProtocol(const std::string& scheme) const override { |
| 223 return scheme == "blob"; | 236 return scheme == "blob"; |
| 224 } | 237 } |
| 225 | 238 |
| 226 bool IsHandledURL(const GURL& url) const override { | 239 bool IsHandledURL(const GURL& url) const override { |
| 227 return url.SchemeIs("blob"); | 240 return url.SchemeIs("blob"); |
| 228 } | 241 } |
| 229 | 242 |
| 230 bool IsSafeRedirectTarget(const GURL& location) const override { | 243 bool IsSafeRedirectTarget(const GURL& location) const override { |
| 231 return true; | 244 return true; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 file_writer_delegate_.reset(); | 486 file_writer_delegate_.reset(); |
| 474 | 487 |
| 475 EXPECT_EQ(pre_write_usage + allowed_growth, usage()); | 488 EXPECT_EQ(pre_write_usage + allowed_growth, usage()); |
| 476 EXPECT_EQ(GetFileSizeOnDisk("test"), usage()); | 489 EXPECT_EQ(GetFileSizeOnDisk("test"), usage()); |
| 477 EXPECT_EQ(kOverlap + allowed_growth, result.bytes_written()); | 490 EXPECT_EQ(kOverlap + allowed_growth, result.bytes_written()); |
| 478 EXPECT_EQ(base::File::FILE_ERROR_NO_SPACE, result.status()); | 491 EXPECT_EQ(base::File::FILE_ERROR_NO_SPACE, result.status()); |
| 479 } | 492 } |
| 480 } | 493 } |
| 481 | 494 |
| 482 } // namespace content | 495 } // namespace content |
| OLD | NEW |