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

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

Issue 99333006: Use AtomicString type more consistently for mimeType / encoding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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/platform/mhtml/ArchiveResource.h ('k') | Source/platform/mhtml/MHTMLParser.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) 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 15 matching lines...) Expand all
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "config.h" 29 #include "config.h"
30 #include "platform/mhtml/ArchiveResource.h" 30 #include "platform/mhtml/ArchiveResource.h"
31 31
32 #include "platform/SharedBuffer.h" 32 #include "platform/SharedBuffer.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 inline ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KUR L& url, const String& mimeType, const String& textEncoding, const String& frameN ame, const ResourceResponse& response) 36 inline ArchiveResource::ArchiveResource(PassRefPtr<SharedBuffer> data, const KUR L& url, const AtomicString& mimeType, const AtomicString& textEncoding, const St ring& frameName, const ResourceResponse& response)
37 : m_url(url) 37 : m_url(url)
38 , m_response(response) 38 , m_response(response)
39 , m_data(data) 39 , m_data(data)
40 , m_mimeType(mimeType) 40 , m_mimeType(mimeType)
41 , m_textEncoding(textEncoding) 41 , m_textEncoding(textEncoding)
42 , m_frameName(frameName) 42 , m_frameName(frameName)
43 { 43 {
44 ASSERT(m_data); 44 ASSERT(m_data);
45 } 45 }
46 46
47 PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> dat a, const KURL& url, const String& mimeType, const String& textEncoding, const St ring& frameName, const ResourceResponse& response) 47 PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> dat a, const KURL& url, const AtomicString& mimeType, const AtomicString& textEncodi ng, const String& frameName, const ResourceResponse& response)
48 { 48 {
49 if (!data) 49 if (!data)
50 return 0; 50 return 0;
51 if (response.isNull()) { 51 if (response.isNull()) {
52 unsigned dataSize = data->size(); 52 unsigned dataSize = data->size();
53 return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, f rameName, 53 return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, f rameName,
54 ResourceResponse(url, mimeType, dataSize, textEncoding, String()))); 54 ResourceResponse(url, mimeType, dataSize, textEncoding, String())));
55 } 55 }
56 return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frame Name, response)); 56 return adoptRef(new ArchiveResource(data, url, mimeType, textEncoding, frame Name, response));
57 } 57 }
58 58
59 PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> dat a, const KURL& url, const ResourceResponse& response) 59 PassRefPtr<ArchiveResource> ArchiveResource::create(PassRefPtr<SharedBuffer> dat a, const KURL& url, const ResourceResponse& response)
60 { 60 {
61 return create(data, url, response.mimeType(), response.textEncodingName(), S tring(), response); 61 return create(data, url, response.mimeType(), response.textEncodingName(), S tring(), response);
62 } 62 }
63 63
64 } 64 }
OLDNEW
« no previous file with comments | « Source/platform/mhtml/ArchiveResource.h ('k') | Source/platform/mhtml/MHTMLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698