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

Side by Side Diff: Source/core/loader/CookieJar.cpp

Issue 205323004: Stop calling blink::Platform::current()->cookieJar() in CookieJar.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 29 matching lines...) Expand all
40 #include "public/platform/WebCookieJar.h" 40 #include "public/platform/WebCookieJar.h"
41 #include "public/platform/WebURL.h" 41 #include "public/platform/WebURL.h"
42 #include "public/platform/WebVector.h" 42 #include "public/platform/WebVector.h"
43 43
44 namespace WebCore { 44 namespace WebCore {
45 45
46 static blink::WebCookieJar* toCookieJar(const Document* document) 46 static blink::WebCookieJar* toCookieJar(const Document* document)
47 { 47 {
48 if (!document || !document->frame()) 48 if (!document || !document->frame())
49 return 0; 49 return 0;
50 blink::WebCookieJar* cookieJar = document->frame()->loader().client()->cooki eJar(); 50 return document->frame()->loader().client()->cookieJar();
51 // FIXME: DRT depends on being able to get a cookie jar from Platform rather than
52 // FrameLoaderClient. Delete this when DRT is deleted.
53 if (!cookieJar)
54 cookieJar = blink::Platform::current()->cookieJar();
55 return cookieJar;
56 } 51 }
57 52
58 String cookies(const Document* document, const KURL& url) 53 String cookies(const Document* document, const KURL& url)
59 { 54 {
60 blink::WebCookieJar* cookieJar = toCookieJar(document); 55 blink::WebCookieJar* cookieJar = toCookieJar(document);
61 if (!cookieJar) 56 if (!cookieJar)
62 return String(); 57 return String();
63 return cookieJar->cookies(url, document->firstPartyForCookies()); 58 return cookieJar->cookies(url, document->firstPartyForCookies());
64 } 59 }
65 60
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 100
106 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)
107 { 102 {
108 blink::WebCookieJar* cookieJar = toCookieJar(document); 103 blink::WebCookieJar* cookieJar = toCookieJar(document);
109 if (!cookieJar) 104 if (!cookieJar)
110 return; 105 return;
111 cookieJar->deleteCookie(url, cookieName); 106 cookieJar->deleteCookie(url, cookieName);
112 } 107 }
113 108
114 } 109 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698