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

Side by Side Diff: third_party/WebKit/Source/platform/exported/WebCryptoAlgorithm.cpp

Issue 2942273002: Avoid some static initializers in Windows builds (Closed)
Patch Set: Use constexpr [] instead of constexpr const * Created 3 years, 6 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 #include "platform/wtf/PtrUtil.h" 35 #include "platform/wtf/PtrUtil.h"
36 #include "platform/wtf/StdLibExtras.h" 36 #include "platform/wtf/StdLibExtras.h"
37 #include "platform/wtf/ThreadSafeRefCounted.h" 37 #include "platform/wtf/ThreadSafeRefCounted.h"
38 #include "public/platform/WebCryptoAlgorithmParams.h" 38 #include "public/platform/WebCryptoAlgorithmParams.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 namespace { 42 namespace {
43 43
44 // A mapping from the algorithm ID to information about the algorithm. 44 // A mapping from the algorithm ID to information about the algorithm.
45 const WebCryptoAlgorithmInfo kAlgorithmIdToInfo[] = { 45 constexpr WebCryptoAlgorithmInfo kAlgorithmIdToInfo[] = {
46 {// Index 0 46 {// Index 0
47 "AES-CBC", 47 "AES-CBC",
48 { 48 {
49 kWebCryptoAlgorithmParamsTypeAesCbcParams, // Encrypt 49 kWebCryptoAlgorithmParamsTypeAesCbcParams, // Encrypt
50 kWebCryptoAlgorithmParamsTypeAesCbcParams, // Decrypt 50 kWebCryptoAlgorithmParamsTypeAesCbcParams, // Decrypt
51 WebCryptoAlgorithmInfo::kUndefined, // Sign 51 WebCryptoAlgorithmInfo::kUndefined, // Sign
52 WebCryptoAlgorithmInfo::kUndefined, // Verify 52 WebCryptoAlgorithmInfo::kUndefined, // Verify
53 WebCryptoAlgorithmInfo::kUndefined, // Digest 53 WebCryptoAlgorithmInfo::kUndefined, // Digest
54 kWebCryptoAlgorithmParamsTypeAesKeyGenParams, // GenerateKey 54 kWebCryptoAlgorithmParamsTypeAesKeyGenParams, // GenerateKey
55 kWebCryptoAlgorithmParamsTypeNone, // ImportKey 55 kWebCryptoAlgorithmParamsTypeNone, // ImportKey
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 void WebCryptoAlgorithm::Assign(const WebCryptoAlgorithm& other) { 537 void WebCryptoAlgorithm::Assign(const WebCryptoAlgorithm& other) {
538 private_ = other.private_; 538 private_ = other.private_;
539 } 539 }
540 540
541 void WebCryptoAlgorithm::Reset() { 541 void WebCryptoAlgorithm::Reset() {
542 private_.Reset(); 542 private_.Reset();
543 } 543 }
544 544
545 } // namespace blink 545 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698