| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "core/frame/SubresourceIntegrity.h" | 5 #include "core/frame/SubresourceIntegrity.h" |
| 6 | 6 |
| 7 #include "core/HTMLNames.h" | 7 #include "core/HTMLNames.h" |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "core/dom/Element.h" | 9 #include "core/dom/Element.h" |
| 10 #include "core/dom/ExecutionContext.h" | 10 #include "core/dom/ExecutionContext.h" |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 skipWhile<UChar, isValueCharacter>(position, end); | 408 skipWhile<UChar, isValueCharacter>(position, end); |
| 409 if (begin != position && executionContext) { | 409 if (begin != position && executionContext) { |
| 410 logErrorToConsole( | 410 logErrorToConsole( |
| 411 "Ignoring unrecogized 'integrity' attribute option '" + | 411 "Ignoring unrecogized 'integrity' attribute option '" + |
| 412 String(begin, position - begin) + "'.", | 412 String(begin, position - begin) + "'.", |
| 413 *executionContext); | 413 *executionContext); |
| 414 } | 414 } |
| 415 } | 415 } |
| 416 | 416 |
| 417 IntegrityMetadata integrityMetadata(digest, algorithm); | 417 IntegrityMetadata integrityMetadata(digest, algorithm); |
| 418 metadataSet.add(integrityMetadata.toPair()); | 418 metadataSet.insert(integrityMetadata.toPair()); |
| 419 } | 419 } |
| 420 | 420 |
| 421 if (metadataSet.size() == 0 && error) | 421 if (metadataSet.size() == 0 && error) |
| 422 return IntegrityParseNoValidResult; | 422 return IntegrityParseNoValidResult; |
| 423 | 423 |
| 424 return IntegrityParseValidResult; | 424 return IntegrityParseValidResult; |
| 425 } | 425 } |
| 426 | 426 |
| 427 } // namespace blink | 427 } // namespace blink |
| OLD | NEW |