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

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

Issue 1846733004: Rename IgnoringCacheData to ValidatingCacheData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 8 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 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 if (m_image->animationPolicy() != newPolicy) { 487 if (m_image->animationPolicy() != newPolicy) {
488 m_image->resetAnimation(); 488 m_image->resetAnimation();
489 m_image->setAnimationPolicy(newPolicy); 489 m_image->setAnimationPolicy(newPolicy);
490 } 490 }
491 } 491 }
492 492
493 void ImageResource::reloadIfLoFi(ResourceFetcher* fetcher) 493 void ImageResource::reloadIfLoFi(ResourceFetcher* fetcher)
494 { 494 {
495 if (!m_response.httpHeaderField("chrome-proxy").contains("q=low")) 495 if (!m_response.httpHeaderField("chrome-proxy").contains("q=low"))
496 return; 496 return;
497 m_resourceRequest.setCachePolicy(ResourceRequestCachePolicy::ReloadBypassing Cache); 497 m_resourceRequest.setCachePolicy(ResourceRequestCachePolicy::BypassingCache) ;
498 m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff); 498 m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff);
499 error(Resource::LoadError); 499 error(Resource::LoadError);
500 load(fetcher); 500 load(fetcher);
501 } 501 }
502 502
503 void ImageResource::changedInRect(const blink::Image* image, const IntRect& rect ) 503 void ImageResource::changedInRect(const blink::Image* image, const IntRect& rect )
504 { 504 {
505 if (!image || image != m_image) 505 if (!image || image != m_image)
506 return; 506 return;
507 notifyObservers(false, &rect); 507 notifyObservers(false, &rect);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 if (response().wasFetchedViaServiceWorker()) 543 if (response().wasFetchedViaServiceWorker())
544 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque; 544 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque;
545 if (!getImage()->currentFrameHasSingleSecurityOrigin()) 545 if (!getImage()->currentFrameHasSingleSecurityOrigin())
546 return false; 546 return false;
547 if (passesAccessControlCheck(securityOrigin)) 547 if (passesAccessControlCheck(securityOrigin))
548 return true; 548 return true;
549 return !securityOrigin->taintsCanvas(response().url()); 549 return !securityOrigin->taintsCanvas(response().url());
550 } 550 }
551 551
552 } // namespace blink 552 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/CachePolicy.h ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698