| 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 "modules/mediasession/MediaMetadataSanitizer.h" | 5 #include "modules/mediasession/MediaMetadataSanitizer.h" |
| 6 | 6 |
| 7 #include "core/dom/ExecutionContext.h" | 7 #include "core/dom/ExecutionContext.h" |
| 8 #include "core/inspector/ConsoleMessage.h" | 8 #include "core/inspector/ConsoleMessage.h" |
| 9 #include "modules/mediasession/MediaImage.h" | 9 #include "modules/mediasession/MediaImage.h" |
| 10 #include "modules/mediasession/MediaMetadata.h" | 10 #include "modules/mediasession/MediaMetadata.h" |
| 11 #include "platform/wtf/text/StringOperators.h" |
| 11 #include "public/platform/WebIconSizesParser.h" | 12 #include "public/platform/WebIconSizesParser.h" |
| 12 #include "public/platform/WebSize.h" | 13 #include "public/platform/WebSize.h" |
| 13 #include "url/url_constants.h" | 14 #include "url/url_constants.h" |
| 14 #include "wtf/text/StringOperators.h" | |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 // Constants used by the sanitizer, must be consistent with | 20 // Constants used by the sanitizer, must be consistent with |
| 21 // content::MediaMetdataSanitizer. | 21 // content::MediaMetdataSanitizer. |
| 22 | 22 |
| 23 // Maximum length of all strings inside MediaMetadata when it is sent over mojo. | 23 // Maximum length of all strings inside MediaMetadata when it is sent over mojo. |
| 24 const size_t kMaxStringLength = 4 * 1024; | 24 const size_t kMaxStringLength = 4 * 1024; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 kJSMessageSource, kWarningMessageLevel, | 109 kJSMessageSource, kWarningMessageLevel, |
| 110 "The number of MediaImage sizes exceeds the upper limit. " | 110 "The number of MediaImage sizes exceeds the upper limit. " |
| 111 "All remaining MediaImage will be ignored")); | 111 "All remaining MediaImage will be ignored")); |
| 112 break; | 112 break; |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 return mojo_metadata; | 115 return mojo_metadata; |
| 116 } | 116 } |
| 117 | 117 |
| 118 } // namespace blink | 118 } // namespace blink |
| OLD | NEW |