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

Side by Side Diff: Source/core/fetch/Resource.cpp

Issue 196043002: HTML Imports: Send credentials for same origin requests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 if (response.httpStatusCode() == 302 || response.httpStatusCode() == 307) { 329 if (response.httpStatusCode() == 302 || response.httpStatusCode() == 307) {
330 // Default to not cacheable. 330 // Default to not cacheable.
331 // FIXME: Consider allowing these to be cached if they have headers perm itting caching. 331 // FIXME: Consider allowing these to be cached if they have headers perm itting caching.
332 return false; 332 return false;
333 } 333 }
334 334
335 return currentAge(response, responseTimestamp) <= freshnessLifetime(response , responseTimestamp); 335 return currentAge(response, responseTimestamp) <= freshnessLifetime(response , responseTimestamp);
336 } 336 }
337 337
338 const ResourceRequest& Resource::lastResourceRequest()
339 {
340 if (!m_redirectChain.size())
341 return m_resourceRequest;
342 return m_redirectChain.last().m_request;
343 }
344
338 void Resource::willSendRequest(ResourceRequest& request, const ResourceResponse& response) 345 void Resource::willSendRequest(ResourceRequest& request, const ResourceResponse& response)
339 { 346 {
340 m_redirectChain.append(RedirectPair(request, response)); 347 m_redirectChain.append(RedirectPair(request, response));
341 m_requestedFromNetworkingLayer = true; 348 m_requestedFromNetworkingLayer = true;
342 } 349 }
343 350
344 bool Resource::unlock() 351 bool Resource::unlock()
345 { 352 {
346 if (hasClients() || m_proxyResource || m_resourceToRevalidate || !m_loadFini shTime || !isSafeToUnlock()) 353 if (hasClients() || m_proxyResource || m_resourceToRevalidate || !m_loadFini shTime || !isSafeToUnlock())
347 return false; 354 return false;
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 return "Shader"; 993 return "Shader";
987 case Resource::ImportResource: 994 case Resource::ImportResource:
988 return "ImportResource"; 995 return "ImportResource";
989 } 996 }
990 ASSERT_NOT_REACHED(); 997 ASSERT_NOT_REACHED();
991 return "Unknown"; 998 return "Unknown";
992 } 999 }
993 #endif // !LOG_DISABLED 1000 #endif // !LOG_DISABLED
994 1001
995 } 1002 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698