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

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

Issue 495353003: Move WebMediaPlayerImpl and its dependencies to media/blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude media/blink from Android GN builds for now like cc/blink does. Created 6 years, 3 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
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 #include "content/renderer/media/test_response_generator.h" 5 #include "media/blink/test_response_generator.h"
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 #include "third_party/WebKit/public/platform/WebString.h" 11 #include "third_party/WebKit/public/platform/WebString.h"
12 #include "third_party/WebKit/public/platform/WebURLResponse.h" 12 #include "third_party/WebKit/public/platform/WebURLResponse.h"
13 13
14 using blink::WebString; 14 using blink::WebString;
15 using blink::WebURLError; 15 using blink::WebURLError;
16 using blink::WebURLResponse; 16 using blink::WebURLResponse;
17 17
18 namespace content { 18 namespace 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),
23 content_length_(content_length) { 23 content_length_(content_length) {
24 } 24 }
25 25
26 WebURLError TestResponseGenerator::GenerateError() { 26 WebURLError TestResponseGenerator::GenerateError() {
27 WebURLError error; 27 WebURLError error;
28 error.reason = net::ERR_ABORTED; 28 error.reason = net::ERR_ABORTED;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 response.setHTTPStatusCode(0); 91 response.setHTTPStatusCode(0);
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 content 101 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698