bug 713503 - prefetch urls from known url shortening sites before gecko is running r=mfinkle

This commit is contained in:
Brad Lassey
2012-01-09 23:50:56 -08:00
parent b9049f193c
commit f94de4f096
3 changed files with 126 additions and 21 deletions

View File

@@ -48,5 +48,19 @@ public class App extends GeckoApp {
public String getContentProcessName() {
return "@MOZ_CHILD_PROCESS_NAME@";
}
public String getDefaultUAString() {
return "Mozilla/5.0 (Android; Linux armv7l; rv:@MOZ_APP_VERSION@) Gecko/@UA_BUILDID@ Firefox/@MOZ_APP_VERSION@ Fennec/@MOZ_APP_VERSION@";
}
public String getUAStringForHost(String host) {
// With our standard UA String, we get a 200 response code and
// client-side redirect from t.co. This slight tweak gives us a
// 302 response code
if ("t.co".equals(host))
return "Mozilla/5.0 (Android; Linux armv7l; rv:@MOZ_APP_VERSION@) Gecko/@UA_BUILDID@ Firefox Mobile/@MOZ_APP_VERSION@";
return getDefaultUAString();
}
};