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

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

Issue 1115553002: Removing blink::prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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
« no previous file with comments | « Source/core/fetch/MockImageResourceClient.h ('k') | Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 482
483 m_cachedMetadata = CachedMetadata::create(dataTypeID, data, size); 483 m_cachedMetadata = CachedMetadata::create(dataTypeID, data, size);
484 484
485 // We don't support sending the metadata to the platform when the response 485 // We don't support sending the metadata to the platform when the response
486 // was fetched via a ServiceWorker to prevent an attacker's Service Worker 486 // was fetched via a ServiceWorker to prevent an attacker's Service Worker
487 // from poisoning the metadata cache. 487 // from poisoning the metadata cache.
488 // FIXME: Support sending the metadata even if the response was fetched via 488 // FIXME: Support sending the metadata even if the response was fetched via
489 // a ServiceWorker. https://crbug.com/448706 489 // a ServiceWorker. https://crbug.com/448706
490 if (cacheType == CachedMetadataHandler::SendToPlatform && !m_response.wasFet chedViaServiceWorker()) { 490 if (cacheType == CachedMetadataHandler::SendToPlatform && !m_response.wasFet chedViaServiceWorker()) {
491 const Vector<char>& serializedData = m_cachedMetadata->serialize(); 491 const Vector<char>& serializedData = m_cachedMetadata->serialize();
492 blink::Platform::current()->cacheMetadata(m_response.url(), m_response.r esponseTime(), serializedData.data(), serializedData.size()); 492 Platform::current()->cacheMetadata(m_response.url(), m_response.response Time(), serializedData.data(), serializedData.size());
493 } 493 }
494 } 494 }
495 495
496 void Resource::clearCachedMetadata(CachedMetadataHandler::CacheType cacheType) 496 void Resource::clearCachedMetadata(CachedMetadataHandler::CacheType cacheType)
497 { 497 {
498 m_cachedMetadata.clear(); 498 m_cachedMetadata.clear();
499 499
500 if (cacheType == CachedMetadataHandler::SendToPlatform) 500 if (cacheType == CachedMetadataHandler::SendToPlatform)
501 blink::Platform::current()->cacheMetadata(m_response.url(), m_response.r esponseTime(), 0, 0); 501 Platform::current()->cacheMetadata(m_response.url(), m_response.response Time(), 0, 0);
502 } 502 }
503 503
504 bool Resource::canDelete() const 504 bool Resource::canDelete() const
505 { 505 {
506 return !hasClients() && !m_loader && !m_preloadCount && hasRightHandleCountA partFromCache(0) 506 return !hasClients() && !m_loader && !m_preloadCount && hasRightHandleCountA partFromCache(0)
507 && !m_protectorCount && !m_resourceToRevalidate && !m_proxyResource; 507 && !m_protectorCount && !m_resourceToRevalidate && !m_proxyResource;
508 } 508 }
509 509
510 bool Resource::hasOneHandle() const 510 bool Resource::hasOneHandle() const
511 { 511 {
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 case Resource::ImportResource: 1074 case Resource::ImportResource:
1075 return "ImportResource"; 1075 return "ImportResource";
1076 case Resource::Media: 1076 case Resource::Media:
1077 return "Media"; 1077 return "Media";
1078 } 1078 }
1079 ASSERT_NOT_REACHED(); 1079 ASSERT_NOT_REACHED();
1080 return "Unknown"; 1080 return "Unknown";
1081 } 1081 }
1082 #endif // !LOG_DISABLED 1082 #endif // !LOG_DISABLED
1083 1083
1084 } 1084 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/fetch/MockImageResourceClient.h ('k') | Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698