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

Side by Side Diff: Source/platform/mhtml/ArchiveResource.cpp

Issue 374053002: Oilpan: move MHTML objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make MHTMLArchive.h self-contained/closed. Created 6 years, 5 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) 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 24 matching lines...) Expand all
35 : m_url(url) 35 : m_url(url)
36 , m_response(response) 36 , m_response(response)
37 , m_data(data) 37 , m_data(data)
38 , m_mimeType(mimeType) 38 , m_mimeType(mimeType)
39 , m_textEncoding(textEncoding) 39 , m_textEncoding(textEncoding)
40 , m_frameName(frameName) 40 , m_frameName(frameName)
41 { 41 {
42 ASSERT(m_data); 42 ASSERT(m_data);
43 } 43 }
44 44
45 PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> dat a, const KURL& url, const AtomicString& mimeType, const AtomicString& textEncodi ng, const String& frameName, const ResourceResponse& response) 45 ArchiveResource::~ArchiveResource()
46 {
47 }
48
49 PassRefPtrWillBeRawPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<Share dBuffer> data, const KURL& url, const AtomicString& mimeType, const AtomicString & textEncoding, const String& frameName, const ResourceResponse& response)
46 { 50 {
47 if (!data) 51 if (!data)
48 return nullptr; 52 return nullptr;
49 if (response.isNull()) { 53 if (response.isNull()) {
50 unsigned dataSize = data->size(); 54 const ResourceResponse& resourceResponse = ResourceResponse(url, mimeTyp e, data->size(), textEncoding, String());
51 return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, f rameName, 55 return adoptRefWillBeNoop(new ArchiveResource(data, url, mimeType, textE ncoding, frameName, resourceResponse));
52 ResourceResponse(url, mimeType, dataSize, textEncoding, String())));
53 } 56 }
54 return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frame Name, response)); 57 return adoptRefWillBeNoop(new ArchiveResource(data, url, mimeType, textEncod ing, frameName, response));
55 } 58 }
56 59
57 PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> dat a, const KURL& url, const ResourceResponse& response) 60 PassRefPtrWillBeRawPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<Share dBuffer> data, const KURL& url, const ResourceResponse& response)
58 { 61 {
59 return create(data, url, response.mimeType(), response.textEncodingName(), S tring(), response); 62 return create(data, url, response.mimeType(), response.textEncodingName(), S tring(), response);
60 } 63 }
61 64
62 } 65 }
OLDNEW
« no previous file with comments | « Source/platform/mhtml/ArchiveResource.h ('k') | Source/platform/mhtml/ArchiveResourceCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698