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

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

Issue 2710113002: DO NOT SUBMIT really old prototype of sprite recognition for image replacement
Patch Set: Created 3 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
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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 WebMemoryAllocatorDump* overheadDump = memoryDump->createMemoryAllocatorDump (overheadName); 877 WebMemoryAllocatorDump* overheadDump = memoryDump->createMemoryAllocatorDump (overheadName);
878 overheadDump->addScalar("size", "bytes", overheadSize()); 878 overheadDump->addScalar("size", "bytes", overheadSize());
879 memoryDump->addSuballocation(overheadDump->guid(), String(WTF::Partitions::k AllocatedObjectPoolName)); 879 memoryDump->addSuballocation(overheadDump->guid(), String(WTF::Partitions::k AllocatedObjectPoolName));
880 } 880 }
881 881
882 String Resource::getMemoryDumpName() const 882 String Resource::getMemoryDumpName() const
883 { 883 {
884 return String::format("web_cache/%s_resources/%ld", resourceTypeToString(get Type(), options().initiatorInfo), m_identifier); 884 return String::format("web_cache/%s_resources/%ld", resourceTypeToString(get Type(), options().initiatorInfo), m_identifier);
885 } 885 }
886 886
887 void Resource::setCachePolicyBypassingCache() 887 void Resource::setResourceRequest(const ResourceRequest& resourceRequest)
888 { 888 {
889 m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache); 889 if (&m_resourceRequest != &resourceRequest)
890 } 890 m_resourceRequest = resourceRequest;
891
892 void Resource::setLoFiStateOff()
893 {
894 m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff);
895 } 891 }
896 892
897 void Resource::revalidationSucceeded(const ResourceResponse& validatingResponse) 893 void Resource::revalidationSucceeded(const ResourceResponse& validatingResponse)
898 { 894 {
899 SECURITY_CHECK(m_redirectChain.isEmpty()); 895 SECURITY_CHECK(m_redirectChain.isEmpty());
900 SECURITY_CHECK(equalIgnoringFragmentIdentifier(validatingResponse.url(), m_r esponse.url())); 896 SECURITY_CHECK(equalIgnoringFragmentIdentifier(validatingResponse.url(), m_r esponse.url()));
901 m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming()); 897 m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming());
902 898
903 // RFC2616 10.3.5 899 // RFC2616 10.3.5
904 // Update cached headers from the 304 response 900 // Update cached headers from the 304 response
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 case Resource::TextTrack: 1056 case Resource::TextTrack:
1061 case Resource::Media: 1057 case Resource::Media:
1062 case Resource::Manifest: 1058 case Resource::Manifest:
1063 return false; 1059 return false;
1064 } 1060 }
1065 NOTREACHED(); 1061 NOTREACHED();
1066 return false; 1062 return false;
1067 } 1063 }
1068 1064
1069 } // namespace blink 1065 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | third_party/WebKit/Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698