Index: chrome/browser/intents/web_intents_registry.cc |
diff --git a/chrome/browser/intents/web_intents_registry.cc b/chrome/browser/intents/web_intents_registry.cc |
index 2dd700063ac28fc45566602ba19e54017477793f..f261277516fc2df3d355d83d3202924ada5ae1d8 100644 |
--- a/chrome/browser/intents/web_intents_registry.cc |
+++ b/chrome/browser/intents/web_intents_registry.cc |
@@ -49,9 +49,13 @@ bool MimeTypesAreEqual(const string16& type1, const string16& type2) { |
// We don't have a MIME matcher that allows patterns on both sides |
// Instead, we do two comparisons, treating each type in turn as a |
// pattern. If either one matches, we consider this a MIME match. |
- if (net::MatchesMimeType(UTF16ToUTF8(type1), UTF16ToUTF8(type2))) |
+ std::string t1 = UTF16ToUTF8(type1); |
+ std::string t2 = UTF16ToUTF8(type2); |
+ StringToLowerASCII(&t1); |
+ StringToLowerASCII(&t2); |
+ if (net::MatchesMimeType(t1, t2)) |
return true; |
- return net::MatchesMimeType(UTF16ToUTF8(type2), UTF16ToUTF8(type1)); |
+ return net::MatchesMimeType(t2, t1); |
} |
// Returns true if the passed string is a MIME type. Works by comparing string |
@@ -325,6 +329,7 @@ void WebIntentsRegistry::OnWebIntentsDefaultsResultReceived( |
if (default_service.user_date <= 0) { |
for (size_t i = 0; i < sizeof(kQuickOfficeViewerMimeType) / sizeof(char*); |
++i) { |
+ LOG(INFO) << "Adding default for QO"; |
Randy Smith (Not in Mondays)
2012/08/16 20:54:41
Remove before landing.
Greg Billock
2012/08/16 21:06:03
Got rid of this and other logging crap.
|
DefaultWebIntentService qoviewer_service; |
qoviewer_service.action = ASCIIToUTF16(kViewActionURL); |
qoviewer_service.type = ASCIIToUTF16(kQuickOfficeViewerMimeType[i]); |