Skip to content

Commit 1ae4ebc

Browse files
committed
remove transitive curl include
1 parent 7bc4420 commit 1ae4ebc

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

google/cloud/storage/testing/mock_http_request.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// limitations under the License.
1414

1515
#include "google/cloud/storage/testing/mock_http_request.h"
16+
#include "google/cloud/internal/curl_handle_factory.h"
1617
#include <memory>
1718

1819
namespace google {
@@ -22,6 +23,13 @@ namespace testing {
2223

2324
std::shared_ptr<MockHttpRequestBuilder::Impl> MockHttpRequestBuilder::mock_;
2425

26+
MockHttpRequestBuilder::MockHttpRequestBuilder(
27+
std::string url,
28+
// NOLINTNEXTLINE(performance-unnecessary-value-param)
29+
std::shared_ptr<google::cloud::rest_internal::CurlHandleFactory> h) {
30+
mock_->Constructor(std::move(url), h->cainfo(), h->capath());
31+
}
32+
2533
} // namespace testing
2634
} // namespace storage
2735
} // namespace cloud

google/cloud/storage/testing/mock_http_request.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
#include "google/cloud/storage/internal/http_response.h"
1919
#include "google/cloud/storage/well_known_parameters.h"
20-
#include "google/cloud/internal/curl_handle_factory.h"
2120
#include "google/cloud/status_or.h"
2221
#include <gmock/gmock.h>
2322
#include <nlohmann/json.hpp>
@@ -27,6 +26,11 @@
2726

2827
namespace google {
2928
namespace cloud {
29+
namespace rest_internal {
30+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
31+
class CurlHandleFactory;
32+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
33+
} // namespace rest_internal
3034
namespace storage {
3135
namespace testing {
3236
/**
@@ -68,9 +72,8 @@ class MockHttpRequestBuilder {
6872
public:
6973
explicit MockHttpRequestBuilder(
7074
// NOLINTNEXTLINE(performance-unnecessary-value-param)
71-
std::string url, std::shared_ptr<rest_internal::CurlHandleFactory> h) {
72-
mock_->Constructor(std::move(url), h->cainfo(), h->capath());
73-
}
75+
std::string url,
76+
std::shared_ptr<google::cloud::rest_internal::CurlHandleFactory> h);
7477

7578
using RequestType = MockHttpRequest;
7679

0 commit comments

Comments
 (0)