OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 if (!cookieJar) | 64 if (!cookieJar) |
65 return; | 65 return; |
66 cookieJar->setCookie(url, document->firstPartyForCookies(), cookieString); | 66 cookieJar->setCookie(url, document->firstPartyForCookies(), cookieString); |
67 } | 67 } |
68 | 68 |
69 bool cookiesEnabled(const Document* document) | 69 bool cookiesEnabled(const Document* document) |
70 { | 70 { |
71 blink::WebCookieJar* cookieJar = toCookieJar(document); | 71 blink::WebCookieJar* cookieJar = toCookieJar(document); |
72 if (!cookieJar) | 72 if (!cookieJar) |
73 return false; | 73 return false; |
74 return cookieJar->cookiesEnabled(document->cookieURL(), document->firstParty
ForCookies()); | 74 return cookieJar->cookiesEnabled(document->inheritedURL(), document->firstPa
rtyForCookies()); |
75 } | 75 } |
76 | 76 |
77 String cookieRequestHeaderFieldValue(const Document* document, const KURL& url) | 77 String cookieRequestHeaderFieldValue(const Document* document, const KURL& url) |
78 { | 78 { |
79 blink::WebCookieJar* cookieJar = toCookieJar(document); | 79 blink::WebCookieJar* cookieJar = toCookieJar(document); |
80 if (!cookieJar) | 80 if (!cookieJar) |
81 return String(); | 81 return String(); |
82 return cookieJar->cookieRequestHeaderFieldValue(url, document->firstPartyFor
Cookies()); | 82 return cookieJar->cookieRequestHeaderFieldValue(url, document->firstPartyFor
Cookies()); |
83 } | 83 } |
84 | 84 |
(...skipping 15 matching lines...) Expand all Loading... |
100 | 100 |
101 void deleteCookie(const Document* document, const KURL& url, const String& cooki
eName) | 101 void deleteCookie(const Document* document, const KURL& url, const String& cooki
eName) |
102 { | 102 { |
103 blink::WebCookieJar* cookieJar = toCookieJar(document); | 103 blink::WebCookieJar* cookieJar = toCookieJar(document); |
104 if (!cookieJar) | 104 if (!cookieJar) |
105 return; | 105 return; |
106 cookieJar->deleteCookie(url, cookieName); | 106 cookieJar->deleteCookie(url, cookieName); |
107 } | 107 } |
108 | 108 |
109 } | 109 } |
OLD | NEW |