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

Unified Diff: Source/core/inspector/NetworkResourcesData.cpp

Issue 74493002: Removed refcounting from TextResourceDecoder (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parserthread_step2
Patch Set: Compile fix Created 7 years, 1 month 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
« no previous file with comments | « Source/core/inspector/NetworkResourcesData.h ('k') | Source/core/loader/DocumentWriter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/NetworkResourcesData.cpp
diff --git a/Source/core/inspector/NetworkResourcesData.cpp b/Source/core/inspector/NetworkResourcesData.cpp
index cf9f2c4b0fd88877cbee3f2fcc0bf006ddb59233..9f2bb4f7777fa939e1cd84cfa32a58113a5a600c 100644
--- a/Source/core/inspector/NetworkResourcesData.cpp
+++ b/Source/core/inspector/NetworkResourcesData.cpp
@@ -155,9 +155,9 @@ void NetworkResourcesData::resourceCreated(const String& requestId, const String
m_requestIdToResourceDataMap.set(requestId, new ResourceData(requestId, loaderId));
}
-static PassRefPtr<TextResourceDecoder> createOtherResourceTextDecoder(const String& mimeType, const String& textEncodingName)
+static PassOwnPtr<TextResourceDecoder> createOtherResourceTextDecoder(const String& mimeType, const String& textEncodingName)
{
- RefPtr<TextResourceDecoder> decoder;
+ OwnPtr<TextResourceDecoder> decoder;
if (!textEncodingName.isEmpty())
decoder = TextResourceDecoder::create("text/plain", textEncodingName);
else if (DOMImplementation::isXMLMIMEType(mimeType.lower())) {
@@ -167,7 +167,7 @@ static PassRefPtr<TextResourceDecoder> createOtherResourceTextDecoder(const Stri
decoder = TextResourceDecoder::create("text/html", "UTF-8");
else if (mimeType == "text/plain")
decoder = TextResourceDecoder::create("text/plain", "ISO-8859-1");
- return decoder;
+ return decoder.release();
}
void NetworkResourcesData::responseReceived(const String& requestId, const String& frameId, const ResourceResponse& response)
« no previous file with comments | « Source/core/inspector/NetworkResourcesData.h ('k') | Source/core/loader/DocumentWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698