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

Unified Diff: chrome/browser/search/contextual_search_promo_source.cc

Issue 450433002: [Resources] Move roboto.woff and add roboto.woff2 to a roboto/ directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fallback to sans-serif Created 6 years, 4 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
Index: chrome/browser/search/contextual_search_promo_source.cc
diff --git a/chrome/browser/search/contextual_search_promo_source.cc b/chrome/browser/search/contextual_search_promo_source.cc
index 7c50b004fecf4a4487408b4b39b8850875bbf24f..0c9a74758d8b124540f5cabd264c0d7d4ec5477e 100644
--- a/chrome/browser/search/contextual_search_promo_source.cc
+++ b/chrome/browser/search/contextual_search_promo_source.cc
@@ -22,7 +22,8 @@ namespace {
const char kPromoHTMLPath[] = "/promo.html";
const char kPromoCSSPath[] = "/promo.css";
const char kPromoJSPath[] = "/promo.js";
-const char kPromoRobotoPath[] = "/roboto.woff";
+const char kRobotoWoffPath[] = "/roboto.woff";
+const char kRobotoWoff2Path[] = "/roboto.woff2";
} // namespace
@@ -43,8 +44,10 @@ void ContextualSearchPromoSource::StartDataRequest(
SendResource(IDR_CONTEXTUAL_SEARCH_PROMO_CSS, callback);
} else if (path == kPromoJSPath) {
SendResource(IDR_CONTEXTUAL_SEARCH_PROMO_JS, callback);
- } else if (path == kPromoRobotoPath) {
- SendResource(IDR_CONTEXTUAL_SEARCH_ROBOTO_WOFF, callback);
+ } else if (path == kRobotoWoffPath) {
+ SendResource(IDR_ROBOTO_WOFF, callback);
+ } else if (path == kRobotoWoff2Path) {
+ SendResource(IDR_ROBOTO_WOFF2, callback);
} else {
callback.Run(NULL);
}
@@ -62,6 +65,7 @@ std::string ContextualSearchPromoSource::GetMimeType(
if (EndsWith(path, ".css", false)) return "text/css";
if (EndsWith(path, ".html", false)) return "text/html";
if (EndsWith(path, ".woff", false)) return "font/woff";
+ if (EndsWith(path, ".woff2", false)) return "font/woff2";
return "";
}

Powered by Google App Engine
This is Rietveld 408576698