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

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

Issue 1738623004: Rename enums/functions that collide in chromium style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-4
Patch Set: get-names-5 Created 4 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 } 608 }
609 if (!hasClients()) 609 if (!hasClients())
610 memoryCache()->makeLive(this); 610 memoryCache()->makeLive(this);
611 611
612 if (!m_revalidatingRequest.isNull()) { 612 if (!m_revalidatingRequest.isNull()) {
613 m_clients.add(client); 613 m_clients.add(client);
614 return; 614 return;
615 } 615 }
616 616
617 // If we have existing data to send to the new client and the resource type supprts it, send it asynchronously. 617 // If we have existing data to send to the new client and the resource type supprts it, send it asynchronously.
618 if (!m_response.isNull() && !shouldSendCachedDataSynchronouslyForType(type() ) && !m_needsSynchronousCacheHit) { 618 if (!m_response.isNull() && !shouldSendCachedDataSynchronouslyForType(getTyp e()) && !m_needsSynchronousCacheHit) {
619 m_clientsAwaitingCallback.add(client); 619 m_clientsAwaitingCallback.add(client);
620 ResourceCallback::callbackHandler()->schedule(this); 620 ResourceCallback::callbackHandler()->schedule(this);
621 return; 621 return;
622 } 622 }
623 623
624 m_clients.add(client); 624 m_clients.add(client);
625 didAddClient(client); 625 didAddClient(client);
626 return; 626 return;
627 } 627 }
628 628
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 } 801 }
802 802
803 const String overheadName = dumpName + "/metadata"; 803 const String overheadName = dumpName + "/metadata";
804 WebMemoryAllocatorDump* overheadDump = memoryDump->createMemoryAllocatorDump (overheadName); 804 WebMemoryAllocatorDump* overheadDump = memoryDump->createMemoryAllocatorDump (overheadName);
805 overheadDump->addScalar("size", "bytes", overheadSize()); 805 overheadDump->addScalar("size", "bytes", overheadSize());
806 memoryDump->addSuballocation(overheadDump->guid(), String(WTF::Partitions::k AllocatedObjectPoolName)); 806 memoryDump->addSuballocation(overheadDump->guid(), String(WTF::Partitions::k AllocatedObjectPoolName));
807 } 807 }
808 808
809 String Resource::getMemoryDumpName() const 809 String Resource::getMemoryDumpName() const
810 { 810 {
811 return String::format("web_cache/%s_resources/%ld", resourceTypeToString(typ e(), options().initiatorInfo), m_identifier); 811 return String::format("web_cache/%s_resources/%ld", resourceTypeToString(get Type(), options().initiatorInfo), m_identifier);
812 } 812 }
813 813
814 void Resource::revalidationSucceeded(const ResourceResponse& validatingResponse) 814 void Resource::revalidationSucceeded(const ResourceResponse& validatingResponse)
815 { 815 {
816 m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming()); 816 m_response.setResourceLoadTiming(validatingResponse.resourceLoadTiming());
817 817
818 // RFC2616 10.3.5 818 // RFC2616 10.3.5
819 // Update cached headers from the 304 response 819 // Update cached headers from the 304 response
820 const HTTPHeaderMap& newHeaders = validatingResponse.httpHeaderFields(); 820 const HTTPHeaderMap& newHeaders = validatingResponse.httpHeaderFields();
821 for (const auto& header : newHeaders) { 821 for (const auto& header : newHeaders) {
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 case Resource::Media: 1111 case Resource::Media:
1112 return "Media"; 1112 return "Media";
1113 case Resource::Manifest: 1113 case Resource::Manifest:
1114 return "Manifest"; 1114 return "Manifest";
1115 } 1115 }
1116 ASSERT_NOT_REACHED(); 1116 ASSERT_NOT_REACHED();
1117 return "Unknown"; 1117 return "Unknown";
1118 } 1118 }
1119 1119
1120 } // namespace blink 1120 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698