]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_auth_registry.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rgw / rgw_auth_registry.h
index 35071c54cd334b1c4b665a471487a71708927520..b9d239aecbd16c4d3919825c274f62c481b10ec5 100644 (file)
@@ -1,9 +1,7 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab ft=cpp
 
-
-#ifndef CEPH_RGW_AUTH_REGISTRY_H
-#define CEPH_RGW_AUTH_REGISTRY_H
+#pragma once
 
 #include <functional>
 #include <memory>
@@ -37,10 +35,10 @@ class StrategyRegistry {
     s3_main_strategy_boto2_t s3_main_strategy_boto2;
 
     s3_main_strategy_t(CephContext* const cct,
-                      ImplicitTenants& implicit_tenant_context,
-                      rgw::sal::Store* store)
-      : s3_main_strategy_plain(cct, implicit_tenant_context, store),
-        s3_main_strategy_boto2(cct, implicit_tenant_context, store) {
+                      const ImplicitTenants& implicit_tenant_context,
+                      rgw::sal::Driver* driver)
+      : s3_main_strategy_plain(cct, implicit_tenant_context, driver),
+        s3_main_strategy_boto2(cct, implicit_tenant_context, driver) {
       add_engine(Strategy::Control::SUFFICIENT, s3_main_strategy_plain);
       add_engine(Strategy::Control::FALLBACK, s3_main_strategy_boto2);
     }
@@ -60,12 +58,12 @@ class StrategyRegistry {
 
 public:
   StrategyRegistry(CephContext* const cct,
-                   ImplicitTenants& implicit_tenant_context,
-                   rgw::sal::Store* store)
-    : s3_main_strategy(cct, implicit_tenant_context, store),
-      s3_post_strategy(cct, implicit_tenant_context, store),
-      swift_strategy(cct, implicit_tenant_context, store),
-      sts_strategy(cct, implicit_tenant_context, store) {
+                   const ImplicitTenants& implicit_tenant_context,
+                   rgw::sal::Driver* driver)
+    : s3_main_strategy(cct, implicit_tenant_context, driver),
+      s3_post_strategy(cct, implicit_tenant_context, driver),
+      swift_strategy(cct, implicit_tenant_context, driver),
+      sts_strategy(cct, implicit_tenant_context, driver) {
   }
 
   const s3_main_strategy_t& get_s3_main() const {
@@ -84,11 +82,11 @@ public:
     return sts_strategy;
   }
 
-  static std::shared_ptr<StrategyRegistry>
+  static std::unique_ptr<StrategyRegistry>
   create(CephContext* const cct,
-         ImplicitTenants& implicit_tenant_context,
-         rgw::sal::Store* store) {
-    return std::make_shared<StrategyRegistry>(cct, implicit_tenant_context, store);
+         const ImplicitTenants& implicit_tenant_context,
+         rgw::sal::Driver* driver) {
+    return std::make_unique<StrategyRegistry>(cct, implicit_tenant_context, driver);
   }
 };
 
@@ -96,6 +94,4 @@ public:
 } /* namespace rgw */
 
 using rgw_auth_registry_t = rgw::auth::StrategyRegistry;
-using rgw_auth_registry_ptr_t = std::shared_ptr<rgw_auth_registry_t>;
-
-#endif /* CEPH_RGW_AUTH_REGISTRY_H */
+using rgw_auth_registry_ptr_t = std::unique_ptr<rgw_auth_registry_t>;