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

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

Issue 2390583002: [WIP] WebFonts cache-aware timeout adaption (Closed)
Patch Set: handle font-display: swap Created 4 years, 2 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
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 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
7 rights reserved. 7 rights reserved.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 557
558 const ResourceRequest& Resource::lastResourceRequest() const { 558 const ResourceRequest& Resource::lastResourceRequest() const {
559 if (!m_redirectChain.size()) 559 if (!m_redirectChain.size())
560 return m_resourceRequest; 560 return m_resourceRequest;
561 return m_redirectChain.last().m_request; 561 return m_redirectChain.last().m_request;
562 } 562 }
563 563
564 void Resource::setRevalidatingRequest(const ResourceRequest& request) { 564 void Resource::setRevalidatingRequest(const ResourceRequest& request) {
565 SECURITY_CHECK(m_redirectChain.isEmpty()); 565 SECURITY_CHECK(m_redirectChain.isEmpty());
566 DCHECK(!request.isNull()); 566 DCHECK(!request.isNull());
567 DCHECK(!request.isCacheAwareLoadingActivated());
567 m_isRevalidating = true; 568 m_isRevalidating = true;
568 m_resourceRequest = request; 569 m_resourceRequest = request;
569 m_status = NotStarted; 570 m_status = NotStarted;
570 } 571 }
571 572
572 bool Resource::willFollowRedirect(const ResourceRequest& newRequest, 573 bool Resource::willFollowRedirect(const ResourceRequest& newRequest,
573 const ResourceResponse& redirectResponse) { 574 const ResourceResponse& redirectResponse) {
574 if (m_isRevalidating) 575 if (m_isRevalidating)
575 revalidationFailed(); 576 revalidationFailed();
576 m_redirectChain.append(RedirectPair(newRequest, redirectResponse)); 577 m_redirectChain.append(RedirectPair(newRequest, redirectResponse));
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 case Resource::TextTrack: 1097 case Resource::TextTrack:
1097 case Resource::Media: 1098 case Resource::Media:
1098 case Resource::Manifest: 1099 case Resource::Manifest:
1099 return false; 1100 return false;
1100 } 1101 }
1101 NOTREACHED(); 1102 NOTREACHED();
1102 return false; 1103 return false;
1103 } 1104 }
1104 1105
1105 } // namespace blink 1106 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698