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

Unified Diff: third_party/WebKit/Source/core/frame/FrameSerializer.cpp

Issue 2220543002: Make Resource::resourceBuffer() to return PassRefPtr<const SharedBuffer> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WTF_UseIsConvertibleInEnsure
Patch Set: Rebase Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/FrameSerializer.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
index c30e485ce7cc2142986dbe9ce06bf90a40bf9731..2bf0a0435c87bb95aad525ba525833d6c3c1ece9 100644
--- a/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
@@ -386,7 +386,7 @@ bool FrameSerializer::shouldAddURL(const KURL& url)
&& !m_delegate.shouldSkipResourceWithURL(url);
}
-void FrameSerializer::addToResources(const Resource& resource, PassRefPtr<SharedBuffer> data, const KURL& url)
+void FrameSerializer::addToResources(const Resource& resource, PassRefPtr<const SharedBuffer> data, const KURL& url)
{
if (m_delegate.shouldSkipResource(resource))
return;
@@ -406,7 +406,7 @@ void FrameSerializer::addImageToResources(ImageResource* image, const KURL& url)
if (!image || !image->hasImage() || image->errorOccurred() || !shouldAddURL(url))
return;
- RefPtr<SharedBuffer> data = image->getImage()->data();
+ RefPtr<const SharedBuffer> data = image->getImage()->data();
addToResources(*image, data, url);
}
@@ -415,7 +415,7 @@ void FrameSerializer::addFontToResources(FontResource* font)
if (!font || !font->isLoaded() || !font->resourceBuffer() || !shouldAddURL(font->url()))
return;
- RefPtr<SharedBuffer> data(font->resourceBuffer());
+ RefPtr<const SharedBuffer> data(font->resourceBuffer());
addToResources(*font, data, font->url());
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameSerializer.h ('k') | third_party/WebKit/Source/core/inspector/InspectorPageAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698