summaryrefslogtreecommitdiff
path: root/core/java/android/webkit/CookieManager.java
Commit message (Collapse)AuthorAgeFilesLines
* WebView: clarify CookieManager docsNate Fischer2021-02-021-11/+29
| | | | | | | | | | | | | | | | | | No change to logic, only documentation change. This adds some clarifications to getCookie()/setCookie(): * getCookie() returns multiple cookies, setCookie() accepts only one * This briefly describes getCookie()'s output format because it's fairly simple * This summarizes setCookie()'s input format and provides an example, but directs the reader to the RFC spec for a full description * Minor formatting changes, including editing a javadoc link which doesn't currently render correctly in kotlin docs (for ValueCallback#onReceiveValue) Fixes: 175471135 Test: m offline-sdk-docs -j4 Change-Id: Id9052fa03584caae5ffc92ed1f6c4d2641d900ce
* Suppress all hidden abstract methods in constructable classes.Aurimas Liutikas2020-11-131-0/+4
| | | | | | | | | | | | | | Having a hidden abstract method for a class that can be extended means that public implementors cannot implement these hidden methods posing a risk that custom implementations will not have required abstract methods resulting in an exception. Bug: 151134792 Test: make update-api Change-Id: I758d12465fabc671be19bedeeceb16885de23c87 Merged-In: I758d12465fabc671be19bedeeceb16885de23c87 Exempt-From-Owner-Approval: large scale suppression of existing issues, no-op in terms of behavior
* Android WebView: Deprecate unsafe file urls APIsHazem Ashmawy2020-03-051-8/+19
| | | | | | | | | | | | | Deprecate unsafe: - WebSettings#setAllowUniversalAccessFromFileURLs - WebSettings#setAllowFileAccessFromFileURLs - CookieManager#setAcceptFileSchemeCookies And direct the users to use WebViewAssetLoader instead. Bug: 148841999 Test: m offline-sdk-docs -j20 Change-Id: I607d1343cb2aa5baead49ceff6dbac4a4474009c
* WebView: deprecate 'Secure' cookies for insecure schemesNate Fischer2020-02-141-0/+6
| | | | | | | | | | | No change to logic, only docs. This announces 'Secure' cookies are deprecated for insecure URL schemes (only "https://" is considered secure). This doesn't mention target SDK, because apps should follow this guidance for all WebView versions, target SDKs, and OS levels. Bug: 149589092 Test: m offline-sdk-docs -j4 Change-Id: I07c2b5341588d354f7f8219ce71a3d2ca04bc982
* Clarify CookieManager RFC reference.Torne (Richard Coles)2019-10-211-1/+4
| | | | | | | | | | | | | | | RFC2109 has been obsolete for a long time, and the docs aren't very clear what exactly the RFC has to do with CookieManager; the RFC is about HTTP and it's not immediately clear how this would apply to a Java API. Update the reference to the current cookie spec (and hyperlink it), and clarify the text to explain that the HTTP header formats from the RFC are the formats used to get/set set cookies. Fixes: 143086151 Test: make ds-docs Change-Id: I5e5838d3435b74516847b63e485fdd93810284aa
* WebView: deprecate accidentally-exposed constructorsNate Fischer2018-09-251-0/+7
| | | | | | | | | | | | | | This deprecates public-exposed constructors. These constructors were exposed by accident. These classes shouldn't be instantiated by applications, but should only be instantiated by WebView. In some cases, the app should get a singleton instance using a #getInstance method. In these cases, we document this explicitly in the deprecation note. Bug: 110807530 Test: make docs, manually verify docs look good. Change-Id: Ibe73b3399c9ced0cf4fbb01e1df13564476df252
* WebView: add @Nullable and @NonNull annotationsNate Fischer2017-09-211-3/+5
| | | | | | | | | | | | | | | | | This adds @Nullable and @NonNull annotations where the docs previously stated this. This change should be safe, since we already disallowed null values for the @NonNull parameters via documentation. I verified that documentation changes for APIs which previously did not mention null-ness in @param or @return Javadocs (if the API already mentioned it in these spots, then DroidDoc prefers the hand-written description). This also fixes various lint errors. Bug: 65465498 Test: make update-api and manually verify docs Change-Id: I4751508d0e72be8ddfc3d6b601db8c307c9df60e
* WebView: wrap Java literals with {@code}Nate Fischer2017-09-051-6/+6
| | | | | | | | | | | | | | | | Docs change only. This wraps some Java literals (true, false, null) with {@code} blocks, as per Android API guidelines. This also addresses other presubmit errors: * fix lines that have become too long * fix broken import order and unused imports Bug: 65213517 Test: make docs (and manually verify things look better) Change-Id: Idc7fe28d40bea7bd1edcad539b75fa9c689b8d46
* Remove synchronized from static methods in WebView.Torne (Richard Coles)2016-07-181-1/+1
| | | | | | | | | | | | | | | ART uses the class object's embedded monitor to protect class initialization - the same monitor used by "synchronized" applied to static methods. This can cause deadlock in extremely rare cases of preemption during WebView code loading. Remove synchronized from all static methods in WebView, to avoid this deadlock. In most cases the synchronized is simply unnecessary in the Chromium-based WebView implementation; in CookieSyncManager we instead use a separately allocated Lock object to preserve thread safety. Bug: 27417671 Change-Id: I13049f23fc984b77a3f4c203a5c698858c64abfe
* Add missing @Deprecated annotations.Aurimas Liutikas2016-05-241-0/+1
| | | | | | | Add missing @Deprecated annotations for methods with @deprecated tag in javadoc. Change-Id: I35b78ccb97832d86b914c21a300444ba29e33844
* Update CookieManager documentationPaul Miller2014-12-121-4/+1
| | | | | | | | The CookieManager documentation became incorrect after deprecating CookieSyncManager. Remove the note about CookieSyncManager. code.google.com/p/android/issues/detail?id=82052 Change-Id: I13bc52716cd71e47b67148186a69f7269e418864
* [WebView] Allow the WebView to be compiled against the system SDK.Ignacio Solla2014-11-121-72/+29
| | | | | BUG:18152150 Change-Id: Ifd6dcac17663631058d895c61bb6e8018c5aeecc
* Put in real "code" (aka marketing) name.Dianne Hackborn2014-10-071-2/+1
| | | | Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
* Remove synchronized from acceptThirdPartyCookies()Hector Dearman2014-08-261-1/+1
| | | | | | | As per API council feedback. Bug: 17253647 Change-Id: Ide3d4b216f01a96e54111f885813ca8a7c3865ba
* Add documentation for CookieManager defualtsHector Dearman2014-07-251-3/+10
| | | | | | | | | | | | | Documents the defualt settings of acceptCookies and acceptFileSchemeCookies. The current defaults: <L >=L acceptCookies | y | y | acceptThirdPartyCookies | y | n | acceptFileCookies | n | n | Bug: 11575158 Change-Id: Ia6cb71bf80608cb2ea8049192f33616e57c15801
* Update CookieManager API for Council review.Hector Dearman2014-07-241-2/+1
| | | | | | | Remove synchronized from setAcceptThirdPartyCookies Bug: 16403458 Change-Id: I6073da2c03fd0952bc447f7cfe0d959148af6877
* Deprecate the Cookie Sync ManagerHector Dearman2014-07-011-2/+10
| | | | | | | | | | | | The CookieSyncManager is largely useless as the WebView automatically syncs cookies every 30s (whether you like it or not). The one method which needs to be saved is sync, there is no other way to force a sync without this. We move sync to the CookieManager and rename it to flush for greater consistency. Bug: 11060034 Change-Id: I8a14998020eea54f196fc6ed845b09ed69cfd447
* Add Third Party Cookie APIHector Dearman2014-06-251-1/+30
| | | | | Bug: 11678084 Change-Id: Ieb74fb6caae3d5a18dbfe748be47ebebad003cf7
* Connect WebView Async Cookie APIsHector Dearman2014-06-171-1/+65
| | | | | Bug: 14379829 Change-Id: I6b0e0644153a805eccb48d30b0ad3e91babd8093
* Removes bad comment from CookieManagerHector Dearman2014-05-191-2/+1
| | | | | | | | | | | | | A change that made the setCookie() docs say setCookie rejected session cookies was introduced here https://googleplex-android-review.git.corp.google.com /#/c/166946/3/core/java/android/webkit/CookieManager.java and looks like it was just a mistaken rephrasing of the original docs. This change removes that comment from the current docs. Bug: 14379829 Change-Id: I36ae708f55faf424424ea18f75c89872e7c71312
* Clean up JavaDoc for CookieManagerSteve Block2012-08-141-2/+2
| | | | | Bug: 5461416 Change-Id: I0ae09943007cf3866daad97a76f5008e61c471ed
* Fix JavaDoc style for several WebView classesSteve Block2012-04-261-20/+31
| | | | | | | | | | | | | | | | | | | | | | | This fixes the JavaDoc style for the following classes ... - CacheManager.java - CookieManager.java - GeolocationPermissions.java - WebResourceResponse.java - WebSettings.java - WebStorage.java - WebView.java In particular, this applies the guidelines at https://wiki.corp.google.com/twiki/bin/view/Main/APIDocumentation This should help to ensure that future JavaDoc comments use correct style, rather than using incorrect style for consistency. Note that this change does not attempt to improve the content of the JavaDoc comments. This will be done in later changes. Bug: 5461416 Change-Id: I79e9b15a8cf3597195d58e154a7eb1bcc462944c
* static methods in CookieManger call via instanceJonathan Dixon2012-04-241-4/+20
| | | | | | | | This allows CookieManager subclasses to correctly override all behvaior in the base class. Bug: 6379925 Change-Id: Ife02db24bc192bc1eabf09e0d64668716786d237
* Fix dumprendertree crashJonathan Dixon2012-04-231-2/+4
| | | | | | | This is a quick workaround to get tests running again, will follow up with full fix tomorrow. Bug: 6379925 Change-Id: I96d6e27bfb8f8cd41ec08845ab0fb1e584dbc9da
* Seperate interface and implementation of 4 WebView classesJonathan Dixon2012-04-231-111/+29
| | | | | | | | | | | | | | | GeolocationPermissionsClassic CookieManagerClassic WebIconDatabaseClassic WebStorageClassic Also creats a WebViewFactory top level class - this remains hidden for now, as it's currently only used implicitly by the other public WebView classes to create the provider instances. Bug: 5626244 Change-Id: Id0ca1c16d8058f31a86414bbc0e8a55db4b907ba
* Two WebView API cleanupsJonathan Dixon2012-04-131-1/+1
| | | | | | | | | | | | - remove final from classes which we will need to provide subclasses in future: CookieManager, GeolocationPermissions, WebIconDatabase and WebStorage. None of these have published constructors, so applications cannot subclass them anyway. - Also convert some protected members of JsResult to private, as its of no use to legal subclasses, and applications cannot subclass it. Change-Id: Iaca9d2db31e25853b6c55feae41d9e7774087479
* Remove superfluous code after removal of Android HTTP stackSteve Block2012-03-261-200/+0
| | | | | | | See b/5495616. Bug: 6228353 Change-Id: I16cfd7b37973919d5bf14d2d80954caede264961
* Drop support for Android HTTP stackSteve Block2012-02-221-776/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All future releases will use the Chromium HTTP stack and maintaining two HTTP stacks adds maintenance overhead. The Chromium HTTP stack requires V8, but we now use V8 in all build targets (b/5495373), so we can safely drop the Android HTTP stack. LoadListener, HttpAuthHandlerImpl, Network, SslErrorHandlerImpl, WebViewWorker - Android-stack specific, removed StreamLoader, FrameLoader - Require LoadListener, removed CacheLoader, ContentLoader, DataLoader, FileLoader - Extend StreamLoader, removed BrowserFrame - Removed methods that create LoadListener - BrowserFrame.startLoadingResource() is called from native CallbackProxy, WebView - Removed calls to Network methods CacheManager, CookieManager, CookieSyncManager, WebViewCore, WebResourceResponse - Removed other Android-stack specific code JniUtlil - Removed useChromiumHttpStack() WebViewDatabase - Removed all code to create cookies and cache databases for Android HTTP stack See corresponding WebKit change https://android-git.corp.google.com/g/166327. Bug: 5495616 Change-Id: If491675516f6eb187077af4220214bb6e6a8d045
* Clean up JavaDoc for CookieManagerSteve Block2012-02-211-65/+71
| | | | | | | | | Also fix naming of CookieManager.pendingCookieOperations. Clean-up only, no functional change. Bug: 5461416 Change-Id: Ia129c4535b8ef6a5a314e588c34ee6db2fe5b386
* Fix crash with HTML5 video.Ben Murdoch2011-12-011-0/+11
| | | | | | | | | | | Add missing check for native HTTP stack inside CookieManager.getCookie(WebAddress) and CookieManager.setCookie(WebAddress) - private APIs that now will throw an exception as the legacy cookie table no longer exists with WebViewDatabase version 11. Bug: 5690908 Change-Id: I51ae848d03b04d6021d314dda4a199675e38ab02
* Fix from post submit reviewKristian Monsen2011-03-021-0/+1
| | | | | Change-Id: I10d96b254dcf3cb04f8d5cdf4bc527c84c362c1c https://android-git.corp.google.com/g/#change,99052
* Part of fix for bug 3489551 Browser doesn't send cookies for HTML5 video in ↵Kristian Monsen2011-03-011-12/+76
| | | | | | | | | | | incognito Adding private mode parameter for some cookie operations. Depends on this change in webkit: https://android-git.corp.google.com/g/#change,99051 Change-Id: I304de625632c3d659bf0d7a6b6a6e2bec985ecb6
* Merge "Adds CookieManager methods to configure policy for cookies for file ↵Steve Block2011-02-101-0/+28
|\ | | | | | | scheme URLs"
| * Adds CookieManager methods to configure policy for cookies for file scheme URLsKristian Monsen2010-12-211-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | Needs https://android-git.corp.google.com/g/83647 in external/webkit, which disallows such cookies by default and provides configuration methods native side. Also updates TestShellActivity to allow such cookies, as they are required for the page cycler. Bug: 2944150 Change-Id: Idcc7e2812fab33e6a2a8766a2176bc3278e617da
* | am 01b7a98c: am 160c18a4: Merge "Need a public way to wait for cookie ↵Patrick Scott2011-02-071-5/+11
|\ \ | | | | | | | | | | | | | | | | | | operations." into honeycomb * commit '01b7a98c31f3d4587fb6739c8c6b35530177c20c': Need a public way to wait for cookie operations.
| * | Need a public way to wait for cookie operations.Patrick Scott2011-02-041-5/+11
| | | | | | | | | | | | | | | | | | | | | Hidden for now as we are past the public api deadline. Bug: 3421214 Change-Id: I8a65ae479d0b8b020af2600d7d29d5d358414add
| * | Fix for bug 3407633 Cookie not set in CookieManager - DO NOT MERGEKristian Monsen2011-02-011-0/+4
| |/ | | | | | | | | | | Setting http:// at the start if there is no :// in the url Change-Id: Idfae4f724808267fe9c8ab3864cfc4305ddac0e7
* | Proper fix for bug 3407633Kristian Monsen2011-02-011-15/+12
| | | | | | | | | | | | | | Using WebAddress to parse the url, this way we will match the java stack. Change-Id: I30979df5ef347d9770985ebbb8139ec119764460
* | Fix for bug 3407633 Cookie not set in CookieManagerKristian Monsen2011-02-011-0/+4
|/ | | | | | Adding http:// at the start of the url if there is no :// already Change-Id: If292f60af3289a9849ff060ffacc0d97e3120132
* Move useChromiumHttpStack() from CookieManager to JniUtil.Iain Merrick2010-12-101-21/+9
| | | | | | | | | | | | This is a generally useful method, not specific to CookieManager. I want to use it to modify the behaviour of CacheManager when we're using the Chrome HTTP stack. Corresponding C++ changes in I78a92cb2 BUG=3270236 Change-Id: I56b0ddcaa93ef340f4ffc3578486c3c96316f2ec
* Make CookieManager.removeSessionCookies asyncKristian Monsen2010-12-091-1/+30
| | | | | | | Webkit loadurl() will wait on the webcore thread until oustanding cookie operations complete. Change-Id: I067408fdb9acd2e2d1f1f21eef910d0b26304332
* Call flushCookieStore() from CookieSyncManager.Iain Merrick2010-12-061-6/+3
| | | | | | | I previously tried to make this a new public API, but I realised it should actually hang off the existing code in CookieSyncManager. Change-Id: Ic44334008266bad5ba1245cf674350a4c10712ce
* Add FlushCookieStore() method to CookieManager (Java side)Iain Merrick2010-12-011-0/+15
| | | | | | | | | The browser app will use this to sync cookies to flash when it is sent to the background. Corresponding C++ code is in Ia9b56f3c. Bug: 3231371 Change-Id: I04e96affcce335191ee2075d0e160f0d8313bf76
* Correctly parse cookies with spaces after = in attributesBrian Carlstrom2010-11-091-5/+8
| | | | | Bug: 3167208 Change-Id: I8adebf9f9e92967a3250e61ccfbb45e02bbee3f9
* Hook up remaining CookieManager methodsSteve Block2010-10-281-0/+23
| | | | | | | | | | hasCookies(), removeExpiredCookie(), removeSessionCookie() and setCookie() Requires a change to external/webkit ... https://android-git.corp.google.com/g/76897 Bug: 3116410 Change-Id: I46603be60e2a6b0e8bac9ca506b56d78643a3658
* Hook up CookieManager.getCookie() for Chromium HTTP stackSteve Block2010-10-271-0/+5
| | | | | | | | Requires a change to external/webkit ... https://android-git.corp.google.com/g/76603 Bug: 3116410 Change-Id: Id0cd5871fd13f952d4f2aa963576a4e610459a18
* Hook up CookieManager.acceptCookie() and setAcceptCookie() for the Chromium ↵Steve Block2010-10-271-0/+11
| | | | | | | | | | HTTP stack Also requires a change to external/webkit ... https://android-git.corp.google.com/g/76066 Bug: 3116410 Change-Id: If8562468708e7d68c5be53db3860647687ebf3bd
* Add a JNI method to determine which HTTP stack is in useSteve Block2010-10-221-5/+17
| | | | | | | | | This will be required when hooking up CookieManager to the Chromium stack, as we need to decide in Java whether or not to call into native code. Bug: 3116410 Change-Id: Ibe2f7687655a93993b19f4fb9b4fed137b3b9466
* Hook up CookieManager.removeAllCookie() for the Chromium HTTP stackSteve Block2010-10-211-0/+8
| | | | | | | | Requires a change to external/webkit ... https://android-git.corp.google.com/g/75473 Bug: 3086308 Change-Id: I01274b3b1384a6947d5a56a51b0b93b1898ddebc
* Make fields in WebAddress private, add getters/settersBjorn Bringert2010-10-131-6/+6
| | | | Change-Id: Iceaf3d648289344e53c37273f7324a79676fbef7