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 #ifndef WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ | 5 #ifndef WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ |
6 #define WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ | 6 #define WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // Generates a regular HTTP 404 response. | 45 // Generates a regular HTTP 404 response. |
46 WebKit::WebURLResponse Generate404(); | 46 WebKit::WebURLResponse Generate404(); |
47 | 47 |
48 // Generates a file:// response starting from |first_byte_offset| until the | 48 // Generates a file:// response starting from |first_byte_offset| until the |
49 // end of the resource. | 49 // end of the resource. |
50 // | 50 // |
51 // If |first_byte_offset| is negative a response containing no content length | 51 // If |first_byte_offset| is negative a response containing no content length |
52 // will be returned. | 52 // will be returned. |
53 WebKit::WebURLResponse GenerateFileResponse(int64 first_byte_offset); | 53 WebKit::WebURLResponse GenerateFileResponse(int64 first_byte_offset); |
54 | 54 |
55 const GURL& gurl() { return gurl_; } | |
56 int64 content_length() { return content_length_; } | 55 int64 content_length() { return content_length_; } |
57 | 56 |
58 private: | 57 private: |
59 GURL gurl_; | 58 GURL gurl_; |
60 int64 content_length_; | 59 int64 content_length_; |
61 | 60 |
62 DISALLOW_COPY_AND_ASSIGN(TestResponseGenerator); | 61 DISALLOW_COPY_AND_ASSIGN(TestResponseGenerator); |
63 }; | 62 }; |
64 | 63 |
65 } // namespace webkit_media | 64 } // namespace webkit_media |
66 | 65 |
67 #endif // WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ | 66 #endif // WEBKIT_MEDIA_TEST_RESPONSE_GENERATOR_H_ |
OLD | NEW |