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

Side by Side Diff: third_party/WebKit/Source/platform/mhtml/MHTMLArchive.cpp

Issue 1923993002: Revert of Remove unnecessary uses of GarbageCollectedFinalized<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 else 60 else
61 stringBuilder.append('?'); 61 stringBuilder.append('?');
62 } 62 }
63 return stringBuilder.toString(); 63 return stringBuilder.toString();
64 } 64 }
65 65
66 MHTMLArchive::MHTMLArchive() 66 MHTMLArchive::MHTMLArchive()
67 { 67 {
68 } 68 }
69 69
70 MHTMLArchive::~MHTMLArchive()
71 {
72 }
73
70 MHTMLArchive* MHTMLArchive::create(const KURL& url, SharedBuffer* data) 74 MHTMLArchive* MHTMLArchive::create(const KURL& url, SharedBuffer* data)
71 { 75 {
72 // For security reasons we only load MHTML pages from local URLs. 76 // For security reasons we only load MHTML pages from local URLs.
73 if (!SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol())) 77 if (!SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol()))
74 return nullptr; 78 return nullptr;
75 79
76 MHTMLParser parser(data); 80 MHTMLParser parser(data);
77 HeapVector<Member<ArchiveResource>> resources = parser.parseArchive(); 81 HeapVector<Member<ArchiveResource>> resources = parser.parseArchive();
78 if (resources.isEmpty()) 82 if (resources.isEmpty())
79 return nullptr; // Invalid MHTML file. 83 return nullptr; // Invalid MHTML file.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 return m_subresources.get(url.getString()); 239 return m_subresources.get(url.getString());
236 } 240 }
237 241
238 DEFINE_TRACE(MHTMLArchive) 242 DEFINE_TRACE(MHTMLArchive)
239 { 243 {
240 visitor->trace(m_mainResource); 244 visitor->trace(m_mainResource);
241 visitor->trace(m_subresources); 245 visitor->trace(m_subresources);
242 } 246 }
243 247
244 } // namespace blink 248 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/mhtml/MHTMLArchive.h ('k') | third_party/WebKit/Source/web/AssociatedURLLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698