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

Side by Side Diff: third_party/WebKit/Source/core/frame/SubresourceIntegrity.cpp

Issue 2846273002: Replace ASSERT_NOT_REACHED with NOTREACHED in core/frame (Closed)
Patch Set: Created 3 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 // 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 break; 83 break;
84 case kHashAlgorithmSha384: 84 case kHashAlgorithmSha384:
85 weaker_algorithms = kWeakerThanSha384; 85 weaker_algorithms = kWeakerThanSha384;
86 length = WTF_ARRAY_LENGTH(kWeakerThanSha384); 86 length = WTF_ARRAY_LENGTH(kWeakerThanSha384);
87 break; 87 break;
88 case kHashAlgorithmSha512: 88 case kHashAlgorithmSha512:
89 weaker_algorithms = kWeakerThanSha512; 89 weaker_algorithms = kWeakerThanSha512;
90 length = WTF_ARRAY_LENGTH(kWeakerThanSha512); 90 length = WTF_ARRAY_LENGTH(kWeakerThanSha512);
91 break; 91 break;
92 default: 92 default:
93 ASSERT_NOT_REACHED(); 93 NOTREACHED();
94 }; 94 };
95 95
96 for (size_t i = 0; i < length; i++) { 96 for (size_t i = 0; i < length; i++) {
97 if (weaker_algorithms[i] == algorithm2) 97 if (weaker_algorithms[i] == algorithm2)
98 return algorithm1; 98 return algorithm1;
99 } 99 }
100 100
101 return algorithm2; 101 return algorithm2;
102 } 102 }
103 103
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 metadata_set.insert(integrity_metadata.ToPair()); 417 metadata_set.insert(integrity_metadata.ToPair());
418 } 418 }
419 419
420 if (metadata_set.size() == 0 && error) 420 if (metadata_set.size() == 0 && error)
421 return kIntegrityParseNoValidResult; 421 return kIntegrityParseNoValidResult;
422 422
423 return kIntegrityParseValidResult; 423 return kIntegrityParseValidResult;
424 } 424 }
425 425
426 } // namespace blink 426 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698