Skip to content

Commit cfcc841

Browse files
authored
impl(universe_domain): remove ExperimentalTag (#15642)
1 parent f894bf7 commit cfcc841

File tree

12 files changed

+24
-32
lines changed

12 files changed

+24
-32
lines changed

google/cloud/storage/tests/universe_domain_integration_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ auto TestOptions() {
6262
options.set<UnifiedCredentialsOption>(
6363
MakeServiceAccountCredentials(contents));
6464

65-
auto ud_options = AddUniverseDomainOption(
66-
ExperimentalTag{}, options.set<ProjectIdOption>(projectId));
65+
auto ud_options =
66+
AddUniverseDomainOption(options.set<ProjectIdOption>(projectId));
6767
if (!ud_options.ok()) throw std::move(ud_options).status();
6868

6969
return *ud_options;

google/cloud/universe_domain.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,20 @@ namespace google {
2222
namespace cloud {
2323
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2424

25-
StatusOr<Options> AddUniverseDomainOption(ExperimentalTag, Options options) {
25+
StatusOr<Options> AddUniverseDomainOption(Options options) {
2626
if (!options.has<UnifiedCredentialsOption>()) {
2727
options.set<UnifiedCredentialsOption>(
2828
MakeGoogleDefaultCredentials(internal::MakeAuthOptions(options)));
2929
}
3030

31-
auto universe_domain = GetUniverseDomain(
32-
ExperimentalTag{}, *options.get<UnifiedCredentialsOption>(), options);
31+
auto universe_domain =
32+
GetUniverseDomain(*options.get<UnifiedCredentialsOption>(), options);
3333
if (!universe_domain) return std::move(universe_domain).status();
3434
return options.set<internal::UniverseDomainOption>(
3535
*std::move(universe_domain));
3636
}
3737

38-
StatusOr<std::string> GetUniverseDomain(ExperimentalTag,
39-
Credentials const& credentials,
38+
StatusOr<std::string> GetUniverseDomain(Credentials const& credentials,
4039
Options const& options) {
4140
return rest_internal::MapCredentials(credentials)->universe_domain(options);
4241
}

google/cloud/universe_domain.h

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

1818
#include "google/cloud/backoff_policy.h"
1919
#include "google/cloud/credentials.h"
20-
#include "google/cloud/experimental_tag.h"
2120
#include "google/cloud/options.h"
2221
#include "google/cloud/status_or.h"
2322
#include "google/cloud/universe_domain_options.h"
@@ -47,8 +46,7 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
4746
* If the `RetryPolicy` becomes exhausted or other errors are encountered, that
4847
* `Status` is returned.
4948
*/
50-
StatusOr<Options> AddUniverseDomainOption(ExperimentalTag tag,
51-
Options options = {});
49+
StatusOr<Options> AddUniverseDomainOption(Options options = {});
5250

5351
/**
5452
* Interrogates the provided credentials for the universe_domain.
@@ -61,8 +59,7 @@ StatusOr<Options> AddUniverseDomainOption(ExperimentalTag tag,
6159
* If successful the universe_domain value is returned, otherwise a `Status`
6260
* indicating the error encountered is returned.
6361
*/
64-
StatusOr<std::string> GetUniverseDomain(ExperimentalTag tag,
65-
Credentials const& credentials,
62+
StatusOr<std::string> GetUniverseDomain(Credentials const& credentials,
6663
Options const& options);
6764

6865
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END

google/cloud/universe_domain/demo/bigquery.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ int main(int argc, char* argv[]) try {
3535
namespace bigquery_storage = ::google::cloud::bigquery_storage_v1;
3636
constexpr int kMaxReadStreams = 1;
3737

38-
auto options =
39-
google::cloud::AddUniverseDomainOption(google::cloud::ExperimentalTag{});
38+
auto options = google::cloud::AddUniverseDomainOption();
4039
if (!options.ok()) throw std::move(options).status();
4140

4241
// Override retry policy to quickly exit if there's a failure.

google/cloud/universe_domain/demo/bigtable.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int main(int argc, char* argv[]) try {
4242

4343
// Interrogate credentials for universe_domain and add the value to returned
4444
// options.
45-
auto ud_options = gc::AddUniverseDomainOption(gc::ExperimentalTag{}, options);
45+
auto ud_options = gc::AddUniverseDomainOption(options);
4646
if (!ud_options.ok()) throw std::move(ud_options).status();
4747

4848
// Override retry policy to quickly exit if there's a failure.

google/cloud/universe_domain/demo/compute.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ int main(int argc, char* argv[]) try {
4343

4444
// Create aliases to make the code easier to read.
4545
namespace disks = ::google::cloud::compute_disks_v1;
46-
auto options =
47-
google::cloud::AddUniverseDomainOption(google::cloud::ExperimentalTag{});
46+
auto options = google::cloud::AddUniverseDomainOption();
4847
if (!options.ok()) throw std::move(options).status();
4948

5049
// Override retry policy to quickly exit if there's a failure.

google/cloud/universe_domain/demo/kms.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int main(int argc, char* argv[]) try {
4242

4343
// Interrogate credentials for universe_domain and add the value to returned
4444
// options.
45-
auto ud_options = gc::AddUniverseDomainOption(gc::ExperimentalTag{}, options);
45+
auto ud_options = gc::AddUniverseDomainOption(options);
4646
if (!ud_options.ok()) throw std::move(ud_options).status();
4747

4848
// Override retry policy to quickly exit if there's a failure.

google/cloud/universe_domain/demo/pubsub.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ int main(int argc, char* argv[]) try {
2828
// Create a namespace alias to make the code easier to read.
2929
namespace pubsub_admin = ::google::cloud::pubsub_admin;
3030

31-
auto options =
32-
google::cloud::AddUniverseDomainOption(google::cloud::ExperimentalTag{});
31+
auto options = google::cloud::AddUniverseDomainOption();
3332
if (!options.ok()) throw std::move(options).status();
3433

3534
// Override retry policy to quickly exit if there's a failure.

google/cloud/universe_domain/demo/spanner.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int main(int argc, char* argv[]) try {
4242

4343
// Interrogate credentials for universe_domain and add the value to returned
4444
// options.
45-
auto ud_options = gc::AddUniverseDomainOption(gc::ExperimentalTag{}, options);
45+
auto ud_options = gc::AddUniverseDomainOption(options);
4646
if (!ud_options.ok()) throw std::move(ud_options).status();
4747

4848
// Override retry policy to quickly exit if there's a failure.

google/cloud/universe_domain/demo/storage.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ int main(int argc, char* argv[]) try {
2727
// Create aliases to make the code easier to read.
2828
namespace gcs = ::google::cloud::storage;
2929

30-
auto options =
31-
google::cloud::AddUniverseDomainOption(google::cloud::ExperimentalTag{});
30+
auto options = google::cloud::AddUniverseDomainOption();
3231
if (!options.ok()) throw std::move(options).status();
3332

3433
// Override retry policy to quickly exit if there's a failure.

0 commit comments

Comments
 (0)