| 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 "webkit/media/test_response_generator.h" | 5 #include "webkit/media/test_response_generator.h" |
| 6 | 6 |
| 7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon
se.h" | 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" |
| 13 | 13 |
| 14 using WebKit::WebString; | 14 using WebKit::WebString; |
| 15 using WebKit::WebURLError; | 15 using WebKit::WebURLError; |
| 16 using WebKit::WebURLResponse; | 16 using WebKit::WebURLResponse; |
| 17 | 17 |
| 18 namespace webkit_media { | 18 namespace webkit_media { |
| 19 | 19 |
| 20 TestResponseGenerator::TestResponseGenerator(const GURL& gurl, | 20 TestResponseGenerator::TestResponseGenerator(const GURL& gurl, |
| 21 int64 content_length) | 21 int64 content_length) |
| 22 : gurl_(gurl), | 22 : gurl_(gurl), |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 if (first_byte_offset >= 0) { | 93 if (first_byte_offset >= 0) { |
| 94 response.setExpectedContentLength(content_length_ - first_byte_offset); | 94 response.setExpectedContentLength(content_length_ - first_byte_offset); |
| 95 } else { | 95 } else { |
| 96 response.setExpectedContentLength(-1); | 96 response.setExpectedContentLength(-1); |
| 97 } | 97 } |
| 98 return response; | 98 return response; |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace webkit_media | 101 } // namespace webkit_media |
| OLD | NEW |