Index: media/blink/buffered_resource_loader.cc |
diff --git a/content/renderer/media/buffered_resource_loader.cc b/media/blink/buffered_resource_loader.cc |
similarity index 98% |
rename from content/renderer/media/buffered_resource_loader.cc |
rename to media/blink/buffered_resource_loader.cc |
index b43359c982914496418fd8eca6bc0d9b4ed3ad69..d88266d06b22dbe60cd90967b7de340973b58806 100644 |
--- a/content/renderer/media/buffered_resource_loader.cc |
+++ b/media/blink/buffered_resource_loader.cc |
@@ -2,16 +2,15 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "content/renderer/media/buffered_resource_loader.h" |
+#include "media/blink/buffered_resource_loader.h" |
#include "base/bits.h" |
#include "base/callback_helpers.h" |
#include "base/metrics/histogram.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_util.h" |
-#include "content/public/common/url_constants.h" |
-#include "content/renderer/media/cache_util.h" |
#include "media/base/media_log.h" |
+#include "media/blink/cache_util.h" |
#include "net/http/http_byte_range.h" |
#include "net/http/http_request_headers.h" |
#include "third_party/WebKit/public/platform/WebString.h" |
@@ -28,7 +27,7 @@ using blink::WebURLLoaderOptions; |
using blink::WebURLRequest; |
using blink::WebURLResponse; |
-namespace content { |
+namespace media { |
static const int kHttpOK = 200; |
static const int kHttpPartialContent = 206; |
@@ -103,7 +102,7 @@ BufferedResourceLoader::BufferedResourceLoader( |
DeferStrategy strategy, |
int bitrate, |
float playback_rate, |
- media::MediaLog* media_log) |
+ MediaLog* media_log) |
: buffer_(kMinBufferCapacity, kMinBufferCapacity), |
loader_failed_(false), |
defer_strategy_(strategy), |
@@ -376,8 +375,12 @@ void BufferedResourceLoader::didReceiveResponse( |
int max_enum = base::bits::Log2Ceiling(kMaxReason); |
while (reasons) { |
DCHECK_LT(shift, max_enum); // Sanity check. |
- if (reasons & 0x1) |
- UMA_HISTOGRAM_ENUMERATION("Media.UncacheableReason", shift, max_enum); |
+ if (reasons & 0x1) { |
+ UMA_HISTOGRAM_ENUMERATION("Media.UncacheableReason", |
+ shift, |
+ max_enum); // PRESUBMIT_IGNORE_UMA_MAX |
+ } |
+ |
reasons >>= 1; |
++shift; |
} |
@@ -784,4 +787,4 @@ void BufferedResourceLoader::Log() { |
offset_ + buffer_.forward_bytes())); |
} |
-} // namespace content |
+} // namespace media |