Bug 1405697 - Move HTTP_REQUESTED_RANGE_NOT_SATISFIABLE_CODE to the file it's used in. r=jwwang
It's only used in ChannelMediaResource.cpp, so it may as well be in there.
MozReview-Commit-ID: 5lyeFOoUsUN
--- a/dom/media/ChannelMediaResource.cpp
+++ b/dom/media/ChannelMediaResource.cpp
@@ -9,16 +9,17 @@
#include "nsIAsyncVerifyRedirectCallback.h"
#include "nsICachingChannel.h"
#include "nsIClassOfService.h"
#include "nsIInputStream.h"
#include "nsNetUtil.h"
static const uint32_t HTTP_PARTIAL_RESPONSE_CODE = 206;
static const uint32_t HTTP_OK_CODE = 200;
+static const uint32_t HTTP_REQUESTED_RANGE_NOT_SATISFIABLE_CODE = 416;
mozilla::LazyLogModule gMediaResourceLog("MediaResource");
// Debug logging macro with object pointer and class name.
#define LOG(msg, ...) MOZ_LOG(gMediaResourceLog, mozilla::LogLevel::Debug, \
("%p " msg, this, ##__VA_ARGS__))
namespace mozilla {
--- a/dom/media/MediaResource.h
+++ b/dom/media/MediaResource.h
@@ -31,18 +31,16 @@
// seeked forward is less than this value then a read is
// done rather than a byte range request.
//
// If we assume a 100Mbit connection, and assume reissuing an HTTP seek causes
// a delay of 200ms, then in that 200ms we could have simply read ahead 2MB. So
// setting SEEK_VS_READ_THRESHOLD to 1MB sounds reasonable.
static const int64_t SEEK_VS_READ_THRESHOLD = 1 * 1024 * 1024;
-static const uint32_t HTTP_REQUESTED_RANGE_NOT_SATISFIABLE_CODE = 416;
-
class nsIHttpChannel;
class nsIPrincipal;
namespace mozilla {
// Represents a section of contiguous media, with a start and end offset.
// Used to denote ranges of data which are cached.