Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: media/blink/test_response_generator.h

Issue 1266953002: [Merge to M45]Check the response URL origin in BufferedDataSource to avoid mixing cross-origin resp… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2454
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/blink/buffered_resource_loader.cc ('k') | media/blink/test_response_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef MEDIA_BLINK_TEST_RESPONSE_GENERATOR_H_ 5 #ifndef MEDIA_BLINK_TEST_RESPONSE_GENERATOR_H_
6 #define MEDIA_BLINK_TEST_RESPONSE_GENERATOR_H_ 6 #define MEDIA_BLINK_TEST_RESPONSE_GENERATOR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "third_party/WebKit/public/platform/WebURLError.h" 9 #include "third_party/WebKit/public/platform/WebURLError.h"
10 #include "third_party/WebKit/public/platform/WebURLResponse.h" 10 #include "third_party/WebKit/public/platform/WebURLResponse.h"
(...skipping 24 matching lines...) Expand all
35 35
36 // Generates a regular HTTP 206 response starting from |first_byte_offset| 36 // Generates a regular HTTP 206 response starting from |first_byte_offset|
37 // until the end of the resource. 37 // until the end of the resource.
38 blink::WebURLResponse Generate206(int64 first_byte_offset); 38 blink::WebURLResponse Generate206(int64 first_byte_offset);
39 39
40 // Generates a custom HTTP 206 response starting from |first_byte_offset| 40 // Generates a custom HTTP 206 response starting from |first_byte_offset|
41 // until the end of the resource. You can tweak what gets included in the 41 // until the end of the resource. You can tweak what gets included in the
42 // headers via |flags|. 42 // headers via |flags|.
43 blink::WebURLResponse Generate206(int64 first_byte_offset, Flags flags); 43 blink::WebURLResponse Generate206(int64 first_byte_offset, Flags flags);
44 44
45 // Generates a regular HTTP 206 response starting from |first_byte_offset|
46 // until |last_byte_offset|.
47 blink::WebURLResponse GeneratePartial206(int64 first_byte_offset,
48 int64 last_byte_offset);
49
50 // Generates a custom HTTP 206 response starting from |first_byte_offset|
51 // until |last_byte_offset|. You can tweak what gets included in the
52 // headers via |flags|.
53 blink::WebURLResponse GeneratePartial206(int64 first_byte_offset,
54 int64 last_byte_offset,
55 Flags flags);
56
45 // Generates a regular HTTP 404 response. 57 // Generates a regular HTTP 404 response.
46 blink::WebURLResponse Generate404(); 58 blink::WebURLResponse Generate404();
47 59
48 // Generates a file:// response starting from |first_byte_offset| until the 60 // Generates a file:// response starting from |first_byte_offset| until the
49 // end of the resource. 61 // end of the resource.
50 // 62 //
51 // If |first_byte_offset| is negative a response containing no content length 63 // If |first_byte_offset| is negative a response containing no content length
52 // will be returned. 64 // will be returned.
53 blink::WebURLResponse GenerateFileResponse(int64 first_byte_offset); 65 blink::WebURLResponse GenerateFileResponse(int64 first_byte_offset);
54 66
55 int64 content_length() { return content_length_; } 67 int64 content_length() { return content_length_; }
56 68
57 private: 69 private:
58 GURL gurl_; 70 GURL gurl_;
59 int64 content_length_; 71 int64 content_length_;
60 72
61 DISALLOW_COPY_AND_ASSIGN(TestResponseGenerator); 73 DISALLOW_COPY_AND_ASSIGN(TestResponseGenerator);
62 }; 74 };
63 75
64 } // namespace media 76 } // namespace media
65 77
66 #endif // MEDIA_BLINK_TEST_RESPONSE_GENERATOR_H_ 78 #endif // MEDIA_BLINK_TEST_RESPONSE_GENERATOR_H_
OLDNEW
« no previous file with comments | « media/blink/buffered_resource_loader.cc ('k') | media/blink/test_response_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698