mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 01:42:37 +08:00
remove unnecessary compile guards
This commit is contained in:
parent
4fcdd298b4
commit
89fa7d0558
@ -19,9 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fdbclient/BackupContainerAzureBlobStore.h"
|
#include "fdbclient/BackupContainerAzureBlobStore.h"
|
||||||
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
|
|
||||||
#include "fdbrpc/AsyncFileEncrypted.h"
|
#include "fdbrpc/AsyncFileEncrypted.h"
|
||||||
#emdif
|
|
||||||
|
|
||||||
#include "flow/actorcompiler.h" // This must be the last #include.
|
#include "flow/actorcompiler.h" // This must be the last #include.
|
||||||
|
|
||||||
@ -250,9 +248,7 @@ BackupContainerAzureBlobStore::BackupContainerAzureBlobStore(const NetworkAddres
|
|||||||
const std::string& containerName,
|
const std::string& containerName,
|
||||||
const Optional<std::string>& encryptionKeyFileName)
|
const Optional<std::string>& encryptionKeyFileName)
|
||||||
: containerName(containerName) {
|
: containerName(containerName) {
|
||||||
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
|
|
||||||
setEncryptionKey(encryptionKeyFileName);
|
setEncryptionKey(encryptionKeyFileName);
|
||||||
#endif
|
|
||||||
std::string accountKey = std::getenv("AZURE_KEY");
|
std::string accountKey = std::getenv("AZURE_KEY");
|
||||||
auto credential = std::make_shared<azure::storage_lite::shared_key_credential>(accountName, accountKey);
|
auto credential = std::make_shared<azure::storage_lite::shared_key_credential>(accountName, accountKey);
|
||||||
auto storageAccount = std::make_shared<azure::storage_lite::storage_account>(
|
auto storageAccount = std::make_shared<azure::storage_lite::storage_account>(
|
||||||
|
@ -23,9 +23,7 @@
|
|||||||
#include "fdbclient/BackupContainerFileSystem.h"
|
#include "fdbclient/BackupContainerFileSystem.h"
|
||||||
#include "fdbclient/BackupContainerLocalDirectory.h"
|
#include "fdbclient/BackupContainerLocalDirectory.h"
|
||||||
#include "fdbclient/JsonBuilder.h"
|
#include "fdbclient/JsonBuilder.h"
|
||||||
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
|
|
||||||
#include "flow/StreamCipher.h"
|
#include "flow/StreamCipher.h"
|
||||||
#endif
|
|
||||||
#include "flow/UnitTest.h"
|
#include "flow/UnitTest.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -1481,7 +1479,6 @@ Future<Void> BackupContainerFileSystem::encryptionSetupComplete() const {
|
|||||||
return encryptionSetupFuture;
|
return encryptionSetupFuture;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
|
|
||||||
void BackupContainerFileSystem::setEncryptionKey(Optional<std::string> const& encryptionKeyFileName) {
|
void BackupContainerFileSystem::setEncryptionKey(Optional<std::string> const& encryptionKeyFileName) {
|
||||||
if (encryptionKeyFileName.present()) {
|
if (encryptionKeyFileName.present()) {
|
||||||
#if ENCRYPTION_ENABLED
|
#if ENCRYPTION_ENABLED
|
||||||
@ -1498,11 +1495,6 @@ Future<Void> BackupContainerFileSystem::createTestEncryptionKeyFile(std::string
|
|||||||
return Void();
|
return Void();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
Future<Void> BackupContainerFileSystem::createTestEncryptionKeyFile(std::string const& filename) {
|
|
||||||
return Void();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace backup_test {
|
namespace backup_test {
|
||||||
|
|
||||||
|
@ -156,9 +156,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool usesEncryption() const;
|
bool usesEncryption() const;
|
||||||
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
|
|
||||||
void setEncryptionKey(Optional<std::string> const& encryptionKeyFileName);
|
void setEncryptionKey(Optional<std::string> const& encryptionKeyFileName);
|
||||||
#endif
|
|
||||||
Future<Void> encryptionSetupComplete() const;
|
Future<Void> encryptionSetupComplete() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -133,9 +133,7 @@ std::string BackupContainerLocalDirectory::getURLFormat() {
|
|||||||
|
|
||||||
BackupContainerLocalDirectory::BackupContainerLocalDirectory(const std::string& url,
|
BackupContainerLocalDirectory::BackupContainerLocalDirectory(const std::string& url,
|
||||||
const Optional<std::string>& encryptionKeyFileName) {
|
const Optional<std::string>& encryptionKeyFileName) {
|
||||||
#if (!defined(TLS_DISABLED) && !defined(_WIN32))
|
|
||||||
setEncryptionKey(encryptionKeyFileName);
|
setEncryptionKey(encryptionKeyFileName);
|
||||||
#endif
|
|
||||||
|
|
||||||
std::string path;
|
std::string path;
|
||||||
if (url.find("file://") != 0) {
|
if (url.find("file://") != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user