[tor-commits] [Git][tpo/applications/android-components][android-components-60.0.5-10.0-1] 2 commits: Bug 34439: Isolate Icon loader on Android

Matthew Finkel gitlab at torproject.org
Wed Nov 4 21:55:27 UTC 2020



Matthew Finkel pushed to branch android-components-60.0.5-10.0-1 at The Tor Project / Applications / android-components


Commits:
698c81b9 by Alex Catarineu at 2020-11-04T15:51:00+01:00
Bug 34439: Isolate Icon loader on Android

- - - - -
8dff8431 by Matthew Finkel at 2020-11-04T21:55:08+00:00
Merge remote-tracking branch 'acatgl/34439' into android-components-60.0.5-10.0-1

- - - - -


3 changed files:

- components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/fetch/GeckoViewFetchClient.kt
- components/browser/icons/src/main/java/mozilla/components/browser/icons/loader/HttpIconLoader.kt
- components/concept/fetch/src/main/java/mozilla/components/concept/fetch/Request.kt


Changes:

=====================================
components/browser/engine-gecko-beta/src/main/java/mozilla/components/browser/engine/gecko/fetch/GeckoViewFetchClient.kt
=====================================
@@ -80,6 +80,7 @@ private fun Request.toWebRequest(): WebRequest = WebRequest.Builder(url)
     .addHeadersFrom(this)
     .addBodyFrom(this)
     .cacheMode(if (useCaches) CACHE_MODE_DEFAULT else CACHE_MODE_RELOAD)
+    .origin(origin)
     .build()
 
 private fun WebRequest.Builder.addHeadersFrom(request: Request): WebRequest.Builder {


=====================================
components/browser/icons/src/main/java/mozilla/components/browser/icons/loader/HttpIconLoader.kt
=====================================
@@ -51,7 +51,8 @@ class HttpIconLoader(
             connectTimeout = Pair(CONNECT_TIMEOUT, TimeUnit.SECONDS),
             readTimeout = Pair(READ_TIMEOUT, TimeUnit.SECONDS),
             redirect = Request.Redirect.FOLLOW,
-            useCaches = true)
+            useCaches = true,
+            origin = request.url)
 
         return try {
             val response = httpClient.fetch(downloadRequest)


=====================================
components/concept/fetch/src/main/java/mozilla/components/concept/fetch/Request.kt
=====================================
@@ -46,7 +46,8 @@ data class Request(
     val body: Body? = null,
     val redirect: Redirect = Redirect.FOLLOW,
     val cookiePolicy: CookiePolicy = CookiePolicy.INCLUDE,
-    val useCaches: Boolean = true
+    val useCaches: Boolean = true,
+    val origin: String? = null
 ) {
     /**
      * A [Body] to be send with the [Request].



View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/c2d4d9840a0f8e789e091bc693d01f2995fb5fc5...8dff84319a18189e6b4bcca5ce78beed9aba984b

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/c2d4d9840a0f8e789e091bc693d01f2995fb5fc5...8dff84319a18189e6b4bcca5ce78beed9aba984b
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20201104/b5f9431a/attachment-0001.htm>


More information about the tor-commits mailing list