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

Unified Diff: chrome/browser/android/download/intercept_download_resource_throttle.cc

Issue 2900123003: Intercept more OMA DRM download types (Closed)
Patch Set: Created 3 years, 7 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 | « chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/download/intercept_download_resource_throttle.cc
diff --git a/chrome/browser/android/download/intercept_download_resource_throttle.cc b/chrome/browser/android/download/intercept_download_resource_throttle.cc
index 1321f2e877b80d8034d91ef2b3d28ddeebb0eba4..c9542fff8af09d5dce616cb100687e588b56d10f 100644
--- a/chrome/browser/android/download/intercept_download_resource_throttle.cc
+++ b/chrome/browser/android/download/intercept_download_resource_throttle.cc
@@ -12,6 +12,11 @@
namespace {
static const char kOMADrmMessageMimeType[] = "application/vnd.oma.drm.message";
+static const char kOMADrmContentMimeType[] = "application/vnd.oma.drm.content";
+static const char kOMADrmRightsMimeType1[] =
+ "application/vnd.oma.drm.rights+xml";
+static const char kOMADrmRightsMimeType2[] =
+ "application/vnd.oma.drm.rights+wbxml";
}
InterceptDownloadResourceThrottle::InterceptDownloadResourceThrottle(
@@ -42,8 +47,12 @@ void InterceptDownloadResourceThrottle::WillProcessResponse(bool* defer) {
std::string mime_type;
request_->response_headers()->GetMimeType(&mime_type);
- if (!base::EqualsCaseInsensitiveASCII(mime_type, kOMADrmMessageMimeType))
+ if (!base::EqualsCaseInsensitiveASCII(mime_type, kOMADrmMessageMimeType) &&
+ !base::EqualsCaseInsensitiveASCII(mime_type, kOMADrmContentMimeType) &&
+ !base::EqualsCaseInsensitiveASCII(mime_type, kOMADrmRightsMimeType1) &&
+ !base::EqualsCaseInsensitiveASCII(mime_type, kOMADrmRightsMimeType2)) {
return;
+ }
net::CookieStore* cookie_store = request_->context()->cookie_store();
if (cookie_store) {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698