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

Side by Side Diff: Source/WebCore/loader/LinkLoader.cpp

Issue 11828063: Merge 138173 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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 | Source/WebKit/chromium/tests/PrerenderingTest.cpp » ('j') | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 : m_client(client) 56 : m_client(client)
57 , m_linkLoadTimer(this, &LinkLoader::linkLoadTimerFired) 57 , m_linkLoadTimer(this, &LinkLoader::linkLoadTimerFired)
58 , m_linkLoadingErrorTimer(this, &LinkLoader::linkLoadingErrorTimerFired) 58 , m_linkLoadingErrorTimer(this, &LinkLoader::linkLoadingErrorTimerFired)
59 { 59 {
60 } 60 }
61 61
62 LinkLoader::~LinkLoader() 62 LinkLoader::~LinkLoader()
63 { 63 {
64 if (m_cachedLinkResource) 64 if (m_cachedLinkResource)
65 m_cachedLinkResource->removeClient(this); 65 m_cachedLinkResource->removeClient(this);
66 #if ENABLE(LINK_PRERENDER)
67 if (m_prerenderHandle)
68 m_prerenderHandle->removeClient();
69 #endif
66 } 70 }
67 71
68 void LinkLoader::linkLoadTimerFired(Timer<LinkLoader>* timer) 72 void LinkLoader::linkLoadTimerFired(Timer<LinkLoader>* timer)
69 { 73 {
70 ASSERT_UNUSED(timer, timer == &m_linkLoadTimer); 74 ASSERT_UNUSED(timer, timer == &m_linkLoadTimer);
71 m_client->linkLoaded(); 75 m_client->linkLoaded();
72 } 76 }
73 77
74 void LinkLoader::linkLoadingErrorTimerFired(Timer<LinkLoader>* timer) 78 void LinkLoader::linkLoadingErrorTimerFired(Timer<LinkLoader>* timer)
75 { 79 {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 return true; 169 return true;
166 } 170 }
167 171
168 void LinkLoader::released() 172 void LinkLoader::released()
169 { 173 {
170 // Only prerenders need treatment here; other links either use the CachedRes ource interface, or are notionally 174 // Only prerenders need treatment here; other links either use the CachedRes ource interface, or are notionally
171 // atomic (dns prefetch). 175 // atomic (dns prefetch).
172 #if ENABLE(LINK_PRERENDER) 176 #if ENABLE(LINK_PRERENDER)
173 if (m_prerenderHandle) { 177 if (m_prerenderHandle) {
174 m_prerenderHandle->cancel(); 178 m_prerenderHandle->cancel();
179 m_prerenderHandle->removeClient();
175 m_prerenderHandle.clear(); 180 m_prerenderHandle.clear();
176 } 181 }
177 #endif 182 #endif
178 } 183 }
179 184
180 } 185 }
OLDNEW
« no previous file with comments | « no previous file | Source/WebKit/chromium/tests/PrerenderingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698