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

Unified Diff: net/url_request/url_range_request_job.cc

Issue 104513002: Fixed playing video in component extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Linux compilation fix. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_range_request_job.h ('k') | net/url_request/url_request_simple_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_range_request_job.cc
diff --git a/net/url_request/url_range_request_job.cc b/net/url_request/url_range_request_job.cc
new file mode 100644
index 0000000000000000000000000000000000000000..95cb692dfb493d5d2ddbb16ffe8c88a469603a5b
--- /dev/null
+++ b/net/url_request/url_range_request_job.cc
@@ -0,0 +1,31 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/url_request/url_range_request_job.h"
+
+#include "net/base/net_errors.h"
+#include "net/http/http_request_headers.h"
+#include "net/http/http_util.h"
+
+namespace net {
+
+URLRangeRequestJob::URLRangeRequestJob(URLRequest* request,
+ NetworkDelegate* delegate)
+ : URLRequestJob(request, delegate), range_parse_result_(OK) {
+}
+
+URLRangeRequestJob::~URLRangeRequestJob() {
+}
+
+void URLRangeRequestJob::SetExtraRequestHeaders(
+ const HttpRequestHeaders& headers) {
+ std::string range_header;
+ if (headers.GetHeader(HttpRequestHeaders::kRange, &range_header)) {
+ if (!HttpUtil::ParseRangeHeader(range_header, &ranges_)) {
+ range_parse_result_ = ERR_REQUEST_RANGE_NOT_SATISFIABLE;
+ }
+ }
+}
+
+} // namespace net
« no previous file with comments | « net/url_request/url_range_request_job.h ('k') | net/url_request/url_request_simple_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698