OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "platform/image-encoders/ImageEncoderUtils.h" | 5 #include "platform/image-encoders/ImageEncoderUtils.h" |
6 | 6 |
7 #include "platform/Histogram.h" | 7 #include "platform/Histogram.h" |
8 #include "platform/MIMETypeRegistry.h" | 8 #include "platform/network/mime/MIMETypeRegistry.h" |
9 #include "wtf/Threading.h" | 9 #include "wtf/Threading.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 const char ImageEncoderUtils::DefaultMimeType[] = "image/png"; | 13 const char ImageEncoderUtils::DefaultMimeType[] = "image/png"; |
14 | 14 |
15 // This enum is used in a UMA histogram; the values should not be changed. | 15 // This enum is used in a UMA histogram; the values should not be changed. |
16 enum RequestedImageMimeType { | 16 enum RequestedImageMimeType { |
17 RequestedImageMimeTypePng = 0, | 17 RequestedImageMimeTypePng = 0, |
18 RequestedImageMimeTypeJpeg = 1, | 18 RequestedImageMimeTypeJpeg = 1, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 | 77 |
78 // FIXME: Make isSupportedImageMIMETypeForEncoding threadsafe (to allow this | 78 // FIXME: Make isSupportedImageMIMETypeForEncoding threadsafe (to allow this |
79 // method to be used on a worker thread). | 79 // method to be used on a worker thread). |
80 if (!MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(lowercaseMimeType)) | 80 if (!MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(lowercaseMimeType)) |
81 lowercaseMimeType = DefaultMimeType; | 81 lowercaseMimeType = DefaultMimeType; |
82 return lowercaseMimeType; | 82 return lowercaseMimeType; |
83 } | 83 } |
84 | 84 |
85 } // namespace blink | 85 } // namespace blink |
OLD | NEW |