From 88ad9eab286b0883f7707bb3ea4eb5f38b6b2117 Mon Sep 17 00:00:00 2001 From: Greg Miller <9447643+devjgm@users.noreply.github.com> Date: Mon, 18 Feb 2019 11:01:09 -0500 Subject: [PATCH] Standardize on fully qualified using declarations (#2028) * fixed all usings in storage/ fixed formatting modified: ../storage/bucket_metadata_test.cc modified: ../storage/bucket_test.cc modified: ../storage/client_bucket_acl_test.cc modified: ../storage/client_default_object_acl_test.cc modified: ../storage/client_notifications_test.cc modified: ../storage/client_object_acl_test.cc modified: ../storage/client_object_copy_test.cc modified: ../storage/client_service_account_test.cc modified: ../storage/client_sign_url_test.cc modified: ../storage/client_test.cc modified: ../storage/client_write_object_test.cc modified: ../storage/doc/storage-main.dox modified: ../storage/examples/storage_bucket_acl_samples.cc modified: ../storage/examples/storage_bucket_iam_samples.cc modified: ../storage/examples/storage_bucket_samples.cc modified: ../storage/examples/storage_default_object_acl_samples.cc modified: ../storage/examples/storage_notification_samples.cc modified: ../storage/examples/storage_object_acl_samples.cc modified: ../storage/examples/storage_object_samples.cc modified: ../storage/internal/bucket_acl_requests_test.cc modified: ../storage/internal/bucket_requests.cc modified: ../storage/internal/bucket_requests_test.cc modified: ../storage/internal/compute_engine_util_test.cc modified: ../storage/internal/curl_client_test.cc modified: ../storage/internal/curl_handle.cc modified: ../storage/internal/curl_resumable_upload_session_test.cc modified: ../storage/internal/default_object_acl_requests_test.cc modified: ../storage/internal/format_rfc3339_test.cc modified: ../storage/internal/generate_message_boundary_test.cc modified: ../storage/internal/hash_validator_test.cc modified: ../storage/internal/http_response_test.cc modified: ../storage/internal/logging_client.cc modified: ../storage/internal/logging_client_test.cc modified: ../storage/internal/logging_resumable_upload_session_test.cc modified: ../storage/internal/notification_requests_test.cc modified: ../storage/internal/object_acl_requests_test.cc modified: ../storage/internal/object_requests.cc modified: ../storage/internal/object_requests_test.cc modified: ../storage/internal/openssl_util.h modified: ../storage/internal/parse_rfc3339_test.cc modified: ../storage/internal/retry_client.cc modified: ../storage/internal/retry_client_test.cc modified: ../storage/internal/retry_resumable_upload_session_test.cc modified: ../storage/internal/service_account_requests_test.cc modified: ../storage/internal/signed_url_requests_test.cc modified: ../storage/list_buckets_reader_test.cc modified: ../storage/list_objects_reader_test.cc modified: ../storage/notification_metadata_test.cc modified: ../storage/oauth2/authorized_user_credentials_test.cc modified: ../storage/oauth2/compute_engine_credentials_test.cc modified: ../storage/oauth2/google_application_default_credentials_file_test.cc modified: ../storage/oauth2/google_credentials_test.cc modified: ../storage/oauth2/service_account_credentials.h modified: ../storage/oauth2/service_account_credentials_test.cc modified: ../storage/object_test.cc modified: ../storage/service_account_test.cc modified: ../storage/storage_version_test.cc modified: ../storage/tests/bucket_integration_test.cc modified: ../storage/tests/curl_download_request_integration_test.cc modified: ../storage/tests/curl_request_integration_test.cc modified: ../storage/tests/curl_resumable_streambuf_integration_test.cc modified: ../storage/tests/curl_resumable_upload_session_integration_test.cc modified: ../storage/tests/curl_streambuf_integration_test.cc modified: ../storage/tests/curl_upload_request_integration_test.cc modified: ../storage/tests/object_checksum_integration_test.cc modified: ../storage/tests/object_hash_integration_test.cc modified: ../storage/tests/object_insert_integration_test.cc modified: ../storage/tests/object_integration_test.cc modified: ../storage/tests/object_media_integration_test.cc modified: ../storage/tests/object_resumable_write_integration_test.cc modified: ../storage/tests/object_rewrite_integration_test.cc modified: ../storage/tests/service_account_integration_test.cc modified: ../storage/well_known_headers_test.cc Changes not staged for commit: modified: ../storage/bucket_test.cc modified: ../storage/client_bucket_acl_test.cc modified: ../storage/client_default_object_acl_test.cc modified: ../storage/client_notifications_test.cc modified: ../storage/client_object_acl_test.cc modified: ../storage/client_object_copy_test.cc modified: ../storage/client_service_account_test.cc modified: ../storage/client_test.cc modified: ../storage/client_write_object_test.cc modified: ../storage/internal/curl_resumable_upload_session_test.cc modified: ../storage/internal/logging_client.cc modified: ../storage/internal/logging_client_test.cc modified: ../storage/internal/logging_resumable_upload_session_test.cc modified: ../storage/internal/retry_client_test.cc modified: ../storage/internal/retry_resumable_upload_session_test.cc modified: ../storage/list_buckets_reader_test.cc modified: ../storage/list_objects_reader_test.cc modified: ../storage/oauth2/authorized_user_credentials_test.cc modified: ../storage/oauth2/compute_engine_credentials_test.cc modified: ../storage/oauth2/service_account_credentials_test.cc modified: ../storage/object_test.cc modified: ../storage/storage_version_test.cc modified: ../storage/bucket_metadata_test.cc modified: ../storage/bucket_test.cc modified: ../storage/client_bucket_acl_test.cc modified: ../storage/client_default_object_acl_test.cc modified: ../storage/client_notifications_test.cc modified: ../storage/client_object_acl_test.cc modified: ../storage/client_object_copy_test.cc modified: ../storage/client_service_account_test.cc modified: ../storage/client_sign_url_test.cc modified: ../storage/client_test.cc modified: ../storage/client_write_object_test.cc modified: ../storage/doc/storage-main.dox modified: ../storage/examples/storage_bucket_acl_samples.cc modified: ../storage/examples/storage_bucket_iam_samples.cc modified: ../storage/examples/storage_bucket_samples.cc modified: ../storage/examples/storage_default_object_acl_samples.cc modified: ../storage/examples/storage_notification_samples.cc modified: ../storage/examples/storage_object_acl_samples.cc modified: ../storage/examples/storage_object_samples.cc modified: ../storage/internal/bucket_acl_requests_test.cc modified: ../storage/internal/bucket_requests.cc modified: ../storage/internal/bucket_requests_test.cc modified: ../storage/internal/compute_engine_util_test.cc modified: ../storage/internal/curl_client_test.cc modified: ../storage/internal/curl_handle.cc modified: ../storage/internal/curl_resumable_upload_session_test.cc modified: ../storage/internal/default_object_acl_requests_test.cc modified: ../storage/internal/format_rfc3339_test.cc modified: ../storage/internal/generate_message_boundary_test.cc modified: ../storage/internal/hash_validator_test.cc modified: ../storage/internal/http_response_test.cc modified: ../storage/internal/logging_client.cc modified: ../storage/internal/logging_client_test.cc modified: ../storage/internal/logging_resumable_upload_session_test.cc modified: ../storage/internal/notification_requests_test.cc modified: ../storage/internal/object_acl_requests_test.cc modified: ../storage/internal/object_requests.cc modified: ../storage/internal/object_requests_test.cc modified: ../storage/internal/openssl_util.h modified: ../storage/internal/parse_rfc3339_test.cc modified: ../storage/internal/retry_client.cc modified: ../storage/internal/retry_client_test.cc modified: ../storage/internal/retry_resumable_upload_session_test.cc modified: ../storage/internal/service_account_requests_test.cc modified: ../storage/internal/signed_url_requests_test.cc modified: ../storage/list_buckets_reader_test.cc modified: ../storage/list_objects_reader_test.cc modified: ../storage/notification_metadata_test.cc modified: ../storage/oauth2/authorized_user_credentials_test.cc modified: ../storage/oauth2/compute_engine_credentials_test.cc modified: ../storage/oauth2/google_application_default_credentials_file_test.cc modified: ../storage/oauth2/google_credentials_test.cc modified: ../storage/oauth2/service_account_credentials.h modified: ../storage/oauth2/service_account_credentials_test.cc modified: ../storage/object_test.cc modified: ../storage/service_account_test.cc modified: ../storage/storage_version_test.cc modified: ../storage/tests/bucket_integration_test.cc modified: ../storage/tests/curl_download_request_integration_test.cc modified: ../storage/tests/curl_request_integration_test.cc modified: ../storage/tests/curl_resumable_streambuf_integration_test.cc modified: ../storage/tests/curl_resumable_upload_session_integration_test.cc modified: ../storage/tests/curl_streambuf_integration_test.cc modified: ../storage/tests/curl_upload_request_integration_test.cc modified: ../storage/tests/object_checksum_integration_test.cc modified: ../storage/tests/object_hash_integration_test.cc modified: ../storage/tests/object_insert_integration_test.cc modified: ../storage/tests/object_integration_test.cc modified: ../storage/tests/object_media_integration_test.cc modified: ../storage/tests/object_resumable_write_integration_test.cc modified: ../storage/tests/object_rewrite_integration_test.cc modified: ../storage/tests/service_account_integration_test.cc modified: ../storage/well_known_headers_test.cc Changes not staged for commit: modified: ../storage/bucket_test.cc modified: ../storage/client_bucket_acl_test.cc modified: ../storage/client_default_object_acl_test.cc modified: ../storage/client_notifications_test.cc modified: ../storage/client_object_acl_test.cc modified: ../storage/client_object_copy_test.cc modified: ../storage/client_service_account_test.cc modified: ../storage/client_test.cc modified: ../storage/client_write_object_test.cc modified: ../storage/internal/curl_resumable_upload_session_test.cc modified: ../storage/internal/logging_client.cc modified: ../storage/internal/logging_client_test.cc modified: ../storage/internal/logging_resumable_upload_session_test.cc modified: ../storage/internal/retry_client_test.cc modified: ../storage/internal/retry_resumable_upload_session_test.cc modified: ../storage/list_buckets_reader_test.cc modified: ../storage/list_objects_reader_test.cc modified: ../storage/oauth2/authorized_user_credentials_test.cc modified: ../storage/oauth2/compute_engine_credentials_test.cc modified: ../storage/oauth2/service_account_credentials_test.cc modified: ../storage/object_test.cc modified: ../storage/storage_version_test.cc * fixed formatting * cleaned up a few more; fixed some anon namespaces * fixed build break on gcc 4.8 --- google/cloud/storage/bucket_metadata_test.cc | 5 +- google/cloud/storage/bucket_test.cc | 3 +- .../cloud/storage/client_bucket_acl_test.cc | 3 +- .../storage/client_default_object_acl_test.cc | 3 +- .../storage/client_notifications_test.cc | 3 +- .../cloud/storage/client_object_acl_test.cc | 3 +- .../cloud/storage/client_object_copy_test.cc | 3 +- .../storage/client_service_account_test.cc | 5 +- google/cloud/storage/client_sign_url_test.cc | 1 + google/cloud/storage/client_test.cc | 3 +- .../cloud/storage/client_write_object_test.cc | 5 +- google/cloud/storage/doc/storage-main.dox | 16 ++--- .../examples/storage_bucket_acl_samples.cc | 12 ++-- .../examples/storage_bucket_iam_samples.cc | 8 +-- .../examples/storage_bucket_samples.cc | 52 ++++++++-------- .../storage_default_object_acl_samples.cc | 12 ++-- .../examples/storage_notification_samples.cc | 6 +- .../examples/storage_object_acl_samples.cc | 12 ++-- .../examples/storage_object_samples.cc | 62 +++++++++---------- .../internal/bucket_acl_requests_test.cc | 1 + .../cloud/storage/internal/bucket_requests.cc | 2 +- .../storage/internal/bucket_requests_test.cc | 1 + .../internal/compute_engine_util_test.cc | 1 + .../storage/internal/curl_client_test.cc | 1 + google/cloud/storage/internal/curl_handle.cc | 3 +- .../curl_resumable_upload_session_test.cc | 1 + .../default_object_acl_requests_test.cc | 1 + .../storage/internal/format_rfc3339_test.cc | 1 + .../generate_message_boundary_test.cc | 1 + .../storage/internal/hash_validator_test.cc | 1 + .../storage/internal/http_response_test.cc | 2 + .../cloud/storage/internal/logging_client.cc | 5 +- .../storage/internal/logging_client_test.cc | 3 +- .../logging_resumable_upload_session_test.cc | 1 + .../internal/notification_requests_test.cc | 1 + .../internal/object_acl_requests_test.cc | 1 + .../cloud/storage/internal/object_requests.cc | 6 +- .../storage/internal/object_requests_test.cc | 1 + google/cloud/storage/internal/openssl_util.h | 2 +- .../storage/internal/parse_rfc3339_test.cc | 1 + google/cloud/storage/internal/retry_client.cc | 4 +- .../storage/internal/retry_client_test.cc | 7 ++- .../retry_resumable_upload_session_test.cc | 7 ++- .../internal/service_account_requests_test.cc | 1 + .../internal/signed_url_requests_test.cc | 1 + .../cloud/storage/list_buckets_reader_test.cc | 14 +++-- .../cloud/storage/list_objects_reader_test.cc | 10 +-- .../storage/notification_metadata_test.cc | 1 + .../authorized_user_credentials_test.cc | 1 + .../oauth2/compute_engine_credentials_test.cc | 1 + ...plication_default_credentials_file_test.cc | 1 + .../storage/oauth2/google_credentials_test.cc | 1 + .../oauth2/service_account_credentials.h | 4 +- .../service_account_credentials_test.cc | 1 + google/cloud/storage/object_test.cc | 3 +- google/cloud/storage/service_account_test.cc | 1 + google/cloud/storage/storage_version_test.cc | 3 + google/cloud/storage/testing/retry_tests.h | 16 ++--- .../storage/tests/bucket_integration_test.cc | 3 +- .../curl_download_request_integration_test.cc | 5 +- .../tests/curl_request_integration_test.cc | 7 ++- ...rl_resumable_streambuf_integration_test.cc | 1 + ...sumable_upload_session_integration_test.cc | 1 + .../tests/curl_streambuf_integration_test.cc | 1 + .../curl_upload_request_integration_test.cc | 2 - .../tests/object_checksum_integration_test.cc | 5 +- .../tests/object_hash_integration_test.cc | 5 +- .../tests/object_insert_integration_test.cc | 5 +- .../storage/tests/object_integration_test.cc | 5 +- .../tests/object_media_integration_test.cc | 5 +- ...object_resumable_write_integration_test.cc | 3 +- .../tests/object_rewrite_integration_test.cc | 5 +- .../tests/service_account_integration_test.cc | 1 + .../cloud/storage/well_known_headers_test.cc | 1 + 74 files changed, 225 insertions(+), 161 deletions(-) diff --git a/google/cloud/storage/bucket_metadata_test.cc b/google/cloud/storage/bucket_metadata_test.cc index 03e667b86a9bf..35f57304c9966 100644 --- a/google/cloud/storage/bucket_metadata_test.cc +++ b/google/cloud/storage/bucket_metadata_test.cc @@ -25,8 +25,9 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -using google::cloud::make_optional; -using google::cloud::optional; + +using ::google::cloud::make_optional; +using ::google::cloud::optional; using ::testing::HasSubstr; using ::testing::Not; diff --git a/google/cloud/storage/bucket_test.cc b/google/cloud/storage/bucket_test.cc index 2d7f4f39d3fad..d272afb97a508 100644 --- a/google/cloud/storage/bucket_test.cc +++ b/google/cloud/storage/bucket_test.cc @@ -26,6 +26,8 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::ElementsAre; using ::testing::ElementsAreArray; @@ -33,7 +35,6 @@ using ::testing::HasSubstr; using ::testing::Invoke; using ::testing::Return; using ::testing::ReturnRef; -using testing::canonical_errors::TransientError; /** * Test the functions in Storage::Client related to 'Buckets: *'. diff --git a/google/cloud/storage/client_bucket_acl_test.cc b/google/cloud/storage/client_bucket_acl_test.cc index 3341441064710..9d80be26211cd 100644 --- a/google/cloud/storage/client_bucket_acl_test.cc +++ b/google/cloud/storage/client_bucket_acl_test.cc @@ -26,12 +26,13 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::Invoke; using ::testing::Return; using ::testing::ReturnRef; using ms = std::chrono::milliseconds; -using testing::canonical_errors::TransientError; /** * Test the BucketAccessControls-related functions in storage::Client. diff --git a/google/cloud/storage/client_default_object_acl_test.cc b/google/cloud/storage/client_default_object_acl_test.cc index 1c2e8c3498b86..02e15639b0fd8 100644 --- a/google/cloud/storage/client_default_object_acl_test.cc +++ b/google/cloud/storage/client_default_object_acl_test.cc @@ -26,12 +26,13 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::Invoke; using ::testing::Return; using ::testing::ReturnRef; using ms = std::chrono::milliseconds; -using testing::canonical_errors::TransientError; /** * Test the BucketAccessControls-related functions in storage::Client. diff --git a/google/cloud/storage/client_notifications_test.cc b/google/cloud/storage/client_notifications_test.cc index 43c81e8184af6..061a63a2757c0 100644 --- a/google/cloud/storage/client_notifications_test.cc +++ b/google/cloud/storage/client_notifications_test.cc @@ -28,13 +28,14 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::HasSubstr; using ::testing::Invoke; using ::testing::Return; using ::testing::ReturnRef; using ms = std::chrono::milliseconds; -using testing::canonical_errors::TransientError; /** * Test the BucketAccessControls-related functions in storage::Client. diff --git a/google/cloud/storage/client_object_acl_test.cc b/google/cloud/storage/client_object_acl_test.cc index 888e27b02d8ff..be18c201ba0a6 100644 --- a/google/cloud/storage/client_object_acl_test.cc +++ b/google/cloud/storage/client_object_acl_test.cc @@ -25,12 +25,13 @@ namespace google { namespace cloud { namespace storage { namespace { + +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::Invoke; using ::testing::Return; using ::testing::ReturnRef; using ms = std::chrono::milliseconds; -using testing::canonical_errors::TransientError; /** * Test the ObjectAccessControls-related functions in storage::Client. diff --git a/google/cloud/storage/client_object_copy_test.cc b/google/cloud/storage/client_object_copy_test.cc index a59c44bed9d53..3770b027862a2 100644 --- a/google/cloud/storage/client_object_copy_test.cc +++ b/google/cloud/storage/client_object_copy_test.cc @@ -26,13 +26,14 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::HasSubstr; using ::testing::Invoke; using ::testing::Return; using ::testing::ReturnRef; using ms = std::chrono::milliseconds; -using testing::canonical_errors::TransientError; /** * Test the functions in Storage::Client related to 'Objects: {copy,rewrite}'. diff --git a/google/cloud/storage/client_service_account_test.cc b/google/cloud/storage/client_service_account_test.cc index 2e066ce2b1b48..52a9144110b93 100644 --- a/google/cloud/storage/client_service_account_test.cc +++ b/google/cloud/storage/client_service_account_test.cc @@ -26,13 +26,14 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -using storage::oauth2::CreateAnonymousCredentials; + +using ::google::cloud::storage::oauth2::CreateAnonymousCredentials; +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::Invoke; using ::testing::Return; using ::testing::ReturnRef; using ms = std::chrono::milliseconds; -using testing::canonical_errors::TransientError; /** * Test the Projects.serviceAccount-related functions in storage::Client. diff --git a/google/cloud/storage/client_sign_url_test.cc b/google/cloud/storage/client_sign_url_test.cc index 7685babefe589..547c48973457b 100644 --- a/google/cloud/storage/client_sign_url_test.cc +++ b/google/cloud/storage/client_sign_url_test.cc @@ -26,6 +26,7 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + using ::testing::HasSubstr; constexpr char kJsonKeyfileContents[] = R"""({ diff --git a/google/cloud/storage/client_test.cc b/google/cloud/storage/client_test.cc index 4172865111012..dd655b207bffb 100644 --- a/google/cloud/storage/client_test.cc +++ b/google/cloud/storage/client_test.cc @@ -25,9 +25,10 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::Return; -using testing::canonical_errors::TransientError; class ObservableRetryPolicy : public LimitedErrorCountRetryPolicy { public: diff --git a/google/cloud/storage/client_write_object_test.cc b/google/cloud/storage/client_write_object_test.cc index 5c0b1457a125b..45c222b8d1080 100644 --- a/google/cloud/storage/client_write_object_test.cc +++ b/google/cloud/storage/client_write_object_test.cc @@ -24,13 +24,14 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + +using ::google::cloud::storage::testing::canonical_errors::PermanentError; +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::HasSubstr; using ::testing::Invoke; using ::testing::Return; using ::testing::ReturnRef; -using testing::canonical_errors::PermanentError; -using testing::canonical_errors::TransientError; using ms = std::chrono::milliseconds; /** diff --git a/google/cloud/storage/doc/storage-main.dox b/google/cloud/storage/doc/storage-main.dox index 6fc8c3e15328e..1b7e76afaed44 100644 --- a/google/cloud/storage/doc/storage-main.dox +++ b/google/cloud/storage/doc/storage-main.dox @@ -223,10 +223,10 @@ using the `.status()` member function (and trying to access the value produces undefined behavior). @code {.cpp} -using namespace google::cloud; -[](storage::Client client) { - StatusOr metadata = client.GetBucketMetadata( - "my-bucket"); +using gcs = google::cloud::storage; +[](gcs::Client client) { + google::cloud::StatusOr metadata = + client.GetBucketMetadata("my-bucket"); if (!metadata) { std::cerr << "GetBucketMetadata: " << metadata.status() << "\n"; @@ -246,10 +246,10 @@ the `StatusOr` object. This will return a `T` if the `StatusOr` object contains a value, and will otherwise throw an exception. @code {.cpp} -using namespace google::cloud; -[](storage::Client client) { - storage::BucketMetadata metadata = client.GetBucketMetadata( - "my-bucket").value(); // throws on error +using gcs = google::cloud::storage; +[](gcs::Client client) { + gcs::BucketMetadata metadata = client.GetBucketMetadata( + "my-bucket").value(); // throws on error std::cout << "The metadata for bucket " << metadata.name() << " is " << metadata << "\n"; } diff --git a/google/cloud/storage/examples/storage_bucket_acl_samples.cc b/google/cloud/storage/examples/storage_bucket_acl_samples.cc index 0ab799db396c0..3732aa099f728 100644 --- a/google/cloud/storage/examples/storage_bucket_acl_samples.cc +++ b/google/cloud/storage/examples/storage_bucket_acl_samples.cc @@ -52,7 +52,7 @@ void ListBucketAcl(google::cloud::storage::Client client, int& argc, auto bucket_name = ConsumeArg(argc, argv); //! [list bucket acl] [START storage_print_bucket_acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr> items = client.ListBucketAcl(bucket_name); @@ -80,7 +80,7 @@ void CreateBucketAcl(google::cloud::storage::Client client, int& argc, auto role = ConsumeArg(argc, argv); //! [create bucket acl] [START storage_create_bucket_acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string entity, std::string role) { StatusOr bucket_acl = @@ -131,7 +131,7 @@ void GetBucketAcl(google::cloud::storage::Client client, int& argc, auto entity = ConsumeArg(argc, argv); //! [get bucket acl] [START storage_print_bucket_acl_for_user] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string entity) { StatusOr acl = client.GetBucketAcl(bucket_name, entity); @@ -157,7 +157,7 @@ void UpdateBucketAcl(google::cloud::storage::Client client, int& argc, auto role = ConsumeArg(argc, argv); //! [update bucket acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string entity, std::string role) { gcs::BucketAccessControl desired_acl = @@ -188,7 +188,7 @@ void PatchBucketAcl(google::cloud::storage::Client client, int& argc, auto role = ConsumeArg(argc, argv); //! [patch bucket acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string entity, std::string role) { StatusOr original_acl = @@ -225,7 +225,7 @@ void PatchBucketAclNoRead(google::cloud::storage::Client client, int& argc, auto role = ConsumeArg(argc, argv); //! [patch bucket acl no-read] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string entity, std::string role) { StatusOr patched_acl = client.PatchBucketAcl( diff --git a/google/cloud/storage/examples/storage_bucket_iam_samples.cc b/google/cloud/storage/examples/storage_bucket_iam_samples.cc index 711cb68418817..0265cb9513c35 100644 --- a/google/cloud/storage/examples/storage_bucket_iam_samples.cc +++ b/google/cloud/storage/examples/storage_bucket_iam_samples.cc @@ -52,7 +52,7 @@ void GetBucketIamPolicy(google::cloud::storage::Client client, int& argc, auto bucket_name = ConsumeArg(argc, argv); //! [get bucket iam policy] [START storage_view_bucket_iam_members] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr policy = client.GetBucketIamPolicy(bucket_name); @@ -78,7 +78,7 @@ void AddBucketIamMember(google::cloud::storage::Client client, int& argc, auto member = ConsumeArg(argc, argv); //! [add bucket iam member] [START storage_add_bucket_iam_member] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string role, std::string member) { StatusOr policy = @@ -114,7 +114,7 @@ void RemoveBucketIamMember(google::cloud::storage::Client client, int& argc, auto member = ConsumeArg(argc, argv); //! [remove bucket iam member] [START storage_remove_bucket_iam_member] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string role, std::string member) { StatusOr policy = @@ -153,7 +153,7 @@ void TestBucketIamPermissions(google::cloud::storage::Client client, int& argc, } //! [test bucket iam permissions] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::vector permissions) { StatusOr> actual_permissions = diff --git a/google/cloud/storage/examples/storage_bucket_samples.cc b/google/cloud/storage/examples/storage_bucket_samples.cc index 55853c2f9c110..56154f79e5df9 100644 --- a/google/cloud/storage/examples/storage_bucket_samples.cc +++ b/google/cloud/storage/examples/storage_bucket_samples.cc @@ -51,7 +51,7 @@ void ListBuckets(google::cloud::storage::Client client, int& argc, } //! [list buckets] [START storage_list_buckets] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client) { int count = 0; gcs::ListBucketsReader bucket_list = client.ListBuckets(); @@ -107,7 +107,7 @@ void CreateBucket(google::cloud::storage::Client client, int& argc, auto bucket_name = ConsumeArg(argc, argv); //! [create bucket] [START storage_create_bucket] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr bucket_metadata = client.CreateBucket(bucket_name, gcs::BucketMetadata()); @@ -132,7 +132,7 @@ void CreateBucketForProject(google::cloud::storage::Client client, int& argc, auto project_id = ConsumeArg(argc, argv); //! [create bucket for project] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string project_id) { StatusOr bucket_metadata = client.CreateBucketForProject(bucket_name, project_id, @@ -158,7 +158,7 @@ void GetBucketMetadata(google::cloud::storage::Client client, int& argc, auto bucket_name = ConsumeArg(argc, argv); //! [get bucket metadata] [START storage_get_bucket_metadata] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr bucket_metadata = client.GetBucketMetadata(bucket_name); @@ -204,7 +204,7 @@ void ChangeDefaultStorageClass(google::cloud::storage::Client client, int& argc, auto storage_class = ConsumeArg(argc, argv); //! [update bucket] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string storage_class) { StatusOr meta = client.GetBucketMetadata(bucket_name); @@ -237,7 +237,7 @@ void PatchBucketStorageClass(google::cloud::storage::Client client, int& argc, auto storage_class = ConsumeArg(argc, argv); //! [patch bucket storage class] [START storage_change_default_storage_class] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string storage_class) { StatusOr original = client.GetBucketMetadata(bucket_name); @@ -274,7 +274,7 @@ void PatchBucketStorageClassWithBuilder(google::cloud::storage::Client client, auto storage_class = ConsumeArg(argc, argv); //! [patch bucket storage class with builder] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string storage_class) { StatusOr patched = client.PatchBucket( bucket_name, @@ -301,7 +301,7 @@ void AddBucketDefaultKmsKey(google::cloud::storage::Client client, int& argc, auto key_name = ConsumeArg(argc, argv); //! [add bucket kms key] [START storage_set_bucket_default_kms_key] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string key_name) { StatusOr updated_metadata = client.PatchBucket( bucket_name, gcs::BucketMetadataPatchBuilder().SetEncryption( @@ -336,7 +336,7 @@ void GetBucketDefaultKmsKey(google::cloud::storage::Client client, int& argc, auto bucket_name = ConsumeArg(argc, argv); //! [get bucket default kms key] [START storage_get_bucket_default_kms_key] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr meta = client.GetBucketMetadata(bucket_name); @@ -366,7 +366,7 @@ void RemoveBucketDefaultKmsKey(google::cloud::storage::Client client, int& argc, //! [remove bucket default kms key] // [START storage_bucket_delete_default_kms_key] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr updated_metadata = client.PatchBucket( bucket_name, gcs::BucketMetadataPatchBuilder().ResetEncryption()); @@ -393,7 +393,7 @@ void AddBucketLabel(google::cloud::storage::Client client, int& argc, auto label_value = ConsumeArg(argc, argv); //! [add bucket label] [START storage_add_bucket_label] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string label_key, std::string label_value) { StatusOr updated_metadata = client.PatchBucket( @@ -424,7 +424,7 @@ void GetBucketLabels(google::cloud::storage::Client client, int& argc, auto bucket_name = ConsumeArg(argc, argv); //! [get bucket labels] [START storage_get_bucket_labels] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr bucket_metadata = client.GetBucketMetadata(bucket_name, gcs::Fields("labels")); @@ -457,7 +457,7 @@ void RemoveBucketLabel(google::cloud::storage::Client client, int& argc, auto label_key = ConsumeArg(argc, argv); //! [remove bucket label] [START storage_remove_bucket_label] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string label_key) { StatusOr updated_metadata = client.PatchBucket( bucket_name, gcs::BucketMetadataPatchBuilder().ResetLabel(label_key)); @@ -490,7 +490,7 @@ void GetBilling(google::cloud::storage::Client client, int& argc, auto bucket_name = ConsumeArg(argc, argv); //! [get billing] [START storage_get_requester_pays_status] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr bucket_metadata = client.GetBucketMetadata(bucket_name); @@ -529,7 +529,7 @@ void EnableRequesterPays(google::cloud::storage::Client client, int& argc, auto bucket_name = ConsumeArg(argc, argv); //! [enable requester pays] [START storage_enable_requester_pays] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr bucket_metadata = client.PatchBucket( bucket_name, @@ -563,7 +563,7 @@ void DisableRequesterPays(google::cloud::storage::Client client, int& argc, auto project_id = ConsumeArg(argc, argv); //! [disable requester pays] [START storage_disable_requester_pays] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string project_id) { StatusOr bucket_metadata = client.PatchBucket( bucket_name, @@ -601,7 +601,7 @@ void WriteObjectRequesterPays(google::cloud::storage::Client client, int& argc, auto billed_project = ConsumeArg(argc, argv); //! [write object requester pays] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string billed_project) { std::string const text = "Lorem ipsum dolor sit amet"; @@ -664,7 +664,7 @@ void GetServiceAccount(google::cloud::storage::Client client, int& argc, } //! [get service account] [START storage_get_service_account] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client) { StatusOr service_account_details = client.GetServiceAccount(); @@ -688,7 +688,7 @@ void GetServiceAccountForProject(google::cloud::storage::Client client, //! [get service account for project] // [START storage_get_service_account_for_project] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string project_id) { StatusOr service_account_details = client.GetServiceAccountForProject(project_id); @@ -714,7 +714,7 @@ void GetDefaultEventBasedHold(google::cloud::storage::Client client, int& argc, //! [get default event based hold] // [START storage_get_default_event_based_hold] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr bucket_metadata = client.GetBucketMetadata(bucket_name); @@ -743,7 +743,7 @@ void EnableDefaultEventBasedHold(google::cloud::storage::Client client, //! [enable default event based hold] // [START storage_enable_default_event_based_hold] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr original = client.GetBucketMetadata(bucket_name); @@ -781,7 +781,7 @@ void DisableDefaultEventBasedHold(google::cloud::storage::Client client, //! [disable default event based hold] // [START storage_disable_default_event_based_hold] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr original = client.GetBucketMetadata(bucket_name); @@ -819,7 +819,7 @@ void GetRetentionPolicy(google::cloud::storage::Client client, int& argc, //! [get retention policy] // [START storage_get_retention_policy] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr bucket_metadata = client.GetBucketMetadata(bucket_name); @@ -853,7 +853,7 @@ void SetRetentionPolicy(google::cloud::storage::Client client, int& argc, //! [set retention policy] // [START storage_set_retention_policy] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::chrono::seconds period) { StatusOr original = client.GetBucketMetadata(bucket_name); @@ -895,7 +895,7 @@ void RemoveRetentionPolicy(google::cloud::storage::Client client, int& argc, //! [remove retention policy] // [START storage_remove_retention_policy] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr original = client.GetBucketMetadata(bucket_name); @@ -938,7 +938,7 @@ void LockRetentionPolicy(google::cloud::storage::Client client, int& argc, //! [lock retention policy] // [START storage_lock_retention_policy] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr original = client.GetBucketMetadata(bucket_name); diff --git a/google/cloud/storage/examples/storage_default_object_acl_samples.cc b/google/cloud/storage/examples/storage_default_object_acl_samples.cc index 0b191fdc816d7..cb1482f526ab2 100644 --- a/google/cloud/storage/examples/storage_default_object_acl_samples.cc +++ b/google/cloud/storage/examples/storage_default_object_acl_samples.cc @@ -52,7 +52,7 @@ void ListDefaultObjectAcl(google::cloud::storage::Client client, int& argc, auto bucket_name = ConsumeArg(argc, argv); //! [list default object acl] [START storage_print_bucket_default_acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr> items = client.ListDefaultObjectAcl(bucket_name); @@ -80,7 +80,7 @@ void CreateDefaultObjectAcl(google::cloud::storage::Client client, int& argc, auto role = ConsumeArg(argc, argv); //! [create default object acl] [START storage_add_default_owner] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string entity, std::string role) { StatusOr default_object_acl = @@ -133,7 +133,7 @@ void GetDefaultObjectAcl(google::cloud::storage::Client client, int& argc, auto entity = ConsumeArg(argc, argv); //! [get default object acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string entity) { StatusOr acl = client.GetDefaultObjectAcl(bucket_name, entity); @@ -159,7 +159,7 @@ void UpdateDefaultObjectAcl(google::cloud::storage::Client client, int& argc, auto role = ConsumeArg(argc, argv); //! [update default object acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string entity, std::string role) { StatusOr original_acl = @@ -196,7 +196,7 @@ void PatchDefaultObjectAcl(google::cloud::storage::Client client, int& argc, auto role = ConsumeArg(argc, argv); //! [patch default object acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string entity, std::string role) { StatusOr original_acl = @@ -236,7 +236,7 @@ void PatchDefaultObjectAclNoRead(google::cloud::storage::Client client, auto role = ConsumeArg(argc, argv); //! [patch default object acl no-read] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string entity, std::string role) { StatusOr patched_acl = diff --git a/google/cloud/storage/examples/storage_notification_samples.cc b/google/cloud/storage/examples/storage_notification_samples.cc index e14371987f40d..4d6381a0e49a9 100644 --- a/google/cloud/storage/examples/storage_notification_samples.cc +++ b/google/cloud/storage/examples/storage_notification_samples.cc @@ -52,7 +52,7 @@ void ListNotifications(google::cloud::storage::Client client, int& argc, auto bucket_name = ConsumeArg(argc, argv); //! [list notifications] [START storage_list_bucket_notifications] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name) { StatusOr> items = client.ListNotifications(bucket_name); @@ -79,7 +79,7 @@ void CreateNotification(google::cloud::storage::Client client, int& argc, auto topic_name = ConsumeArg(argc, argv); //! [create notification] [START storage_create_bucket_notifications] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string topic_name) { StatusOr notification = client.CreateNotification(bucket_name, topic_name, @@ -116,7 +116,7 @@ void GetNotification(google::cloud::storage::Client client, int& argc, auto notification_id = ConsumeArg(argc, argv); //! [get notification] [START storage_print_pubsub_bucket_notification] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string notification_id) { StatusOr notification = client.GetNotification(bucket_name, notification_id); diff --git a/google/cloud/storage/examples/storage_object_acl_samples.cc b/google/cloud/storage/examples/storage_object_acl_samples.cc index 575dafb136a70..6a337c2881aa5 100644 --- a/google/cloud/storage/examples/storage_object_acl_samples.cc +++ b/google/cloud/storage/examples/storage_object_acl_samples.cc @@ -54,7 +54,7 @@ void ListObjectAcl(gcs::Client client, int& argc, char* argv[]) { auto object_name = ConsumeArg(argc, argv); //! [list object acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name) { StatusOr> items = client.ListObjectAcl(bucket_name, object_name); @@ -84,7 +84,7 @@ void CreateObjectAcl(gcs::Client client, int& argc, char* argv[]) { auto role = ConsumeArg(argc, argv); //! [create object acl] [START storage_create_file_acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string entity, std::string role) { StatusOr object_acl = @@ -136,7 +136,7 @@ void GetObjectAcl(gcs::Client client, int& argc, char* argv[]) { auto entity = ConsumeArg(argc, argv); //! [get object acl] [START storage_print_file_acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string entity) { StatusOr acl = @@ -165,7 +165,7 @@ void UpdateObjectAcl(gcs::Client client, int& argc, char* argv[]) { auto role = ConsumeArg(argc, argv); //! [update object acl] [START storage_update_file_acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string entity, std::string role) { StatusOr current_acl = @@ -202,7 +202,7 @@ void PatchObjectAcl(gcs::Client client, int& argc, char* argv[]) { auto role = ConsumeArg(argc, argv); //! [patch object acl] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string entity, std::string role) { StatusOr original_acl = @@ -241,7 +241,7 @@ void PatchObjectAclNoRead(gcs::Client client, int& argc, char* argv[]) { auto role = ConsumeArg(argc, argv); //! [patch object acl no-read] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string entity, std::string role) { StatusOr patched_acl = client.PatchObjectAcl( diff --git a/google/cloud/storage/examples/storage_object_samples.cc b/google/cloud/storage/examples/storage_object_samples.cc index 33092f6a26032..98fb03a8f643b 100644 --- a/google/cloud/storage/examples/storage_object_samples.cc +++ b/google/cloud/storage/examples/storage_object_samples.cc @@ -80,7 +80,7 @@ void InsertObject(google::cloud::storage::Client client, int& argc, auto contents = ConsumeArg(argc, argv); //! [insert object] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string contents) { StatusOr object_metadata = @@ -110,7 +110,7 @@ void InsertObjectStrictIdempotency(google::cloud::storage::Client unused, auto contents = ConsumeArg(argc, argv); //! [insert object strict idempotency] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](std::string bucket_name, std::string object_name, std::string contents) { // Create a client that only retries idempotent operations, the default is // to retry all operations. @@ -150,7 +150,7 @@ void InsertObjectModifiedRetry(google::cloud::storage::Client unused, int& argc, auto contents = ConsumeArg(argc, argv); //! [insert object modified retry] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](std::string bucket_name, std::string object_name, std::string contents) { // Create a client that only gives up on the third error. The default policy // is to retry for several minutes. @@ -192,7 +192,7 @@ void InsertObjectMultipart(google::cloud::storage::Client client, int& argc, auto contents = ConsumeArg(argc, argv); //! [insert object multipart] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string content_type, std::string contents) { // Setting the object metadata (via the `gcs::WithObjectMadata` option) @@ -230,7 +230,7 @@ void CopyObject(google::cloud::storage::Client client, int& argc, auto destination_object_name = ConsumeArg(argc, argv); //! [copy object] [START storage_copy_file] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string source_bucket_name, std::string source_object_name, std::string destination_bucket_name, std::string destination_object_name) { @@ -268,7 +268,7 @@ void CopyEncryptedObject(google::cloud::storage::Client client, int& argc, auto key = ConsumeArg(argc, argv); //! [copy encrypted object] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string source_bucket_name, std::string source_object_name, std::string destination_bucket_name, std::string destination_object_name, std::string key_base64) { @@ -300,7 +300,7 @@ void GetObjectMetadata(google::cloud::storage::Client client, int& argc, auto object_name = ConsumeArg(argc, argv); //! [get object metadata] [START storage_get_metadata] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name) { StatusOr object_metadata = client.GetObjectMetadata(bucket_name, object_name); @@ -406,7 +406,7 @@ void WriteObject(google::cloud::storage::Client client, int& argc, //! [write object] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, long desired_line_count) { std::string const text = "Lorem ipsum dolor sit amet"; @@ -511,7 +511,7 @@ void ResumeResumableUpload(google::cloud::storage::Client client, int& argc, //! [resume resumable upload] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string session_id) { // Restore a resumable upload stream, the library automatically queries the @@ -559,7 +559,7 @@ void UploadFile(google::cloud::storage::Client client, int& argc, //! [upload file] [START storage_upload_file] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string file_name, std::string bucket_name, std::string object_name) { // Note that the client library automatically computes a hash on the @@ -592,7 +592,7 @@ void UploadFileResumable(google::cloud::storage::Client client, int& argc, //! [upload file resumable] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string file_name, std::string bucket_name, std::string object_name) { // Note that the client library automatically computes a hash on the @@ -652,7 +652,7 @@ void UpdateObjectMetadata(google::cloud::storage::Client client, int& argc, auto value = ConsumeArg(argc, argv); //! [update object metadata] [START storage_set_metadata] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string key, std::string value) { StatusOr object_metadata = @@ -690,7 +690,7 @@ void PatchObjectDeleteMetadata(google::cloud::storage::Client client, int& argc, auto key = ConsumeArg(argc, argv); //! [patch object delete metadata] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string key) { StatusOr original = @@ -728,7 +728,7 @@ void PatchObjectContentType(google::cloud::storage::Client client, int& argc, auto content_type = ConsumeArg(argc, argv); //! [patch object content type] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string content_type) { StatusOr updated = client.PatchObject( @@ -755,7 +755,7 @@ void MakeObjectPublic(google::cloud::storage::Client client, int& argc, auto object_name = ConsumeArg(argc, argv); //! [make object public] [START storage_make_public] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name) { StatusOr updated = client.PatchObject( bucket_name, object_name, gcs::ObjectMetadataPatchBuilder(), @@ -856,7 +856,7 @@ void WriteEncryptedObject(google::cloud::storage::Client client, int& argc, auto base64_aes256_key = ConsumeArg(argc, argv); //! [insert encrypted object] [START storage_upload_encrypted_file] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string base64_aes256_key) { StatusOr object_metadata = client.InsertObject( @@ -915,7 +915,7 @@ void ComposeObject(google::cloud::storage::Client client, int& argc, } //! [compose object] [START storage_compose_file] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string destination_object_name, std::vector compose_objects) { @@ -952,7 +952,7 @@ void ComposeObjectFromEncryptedObjects(google::cloud::storage::Client client, } //! [compose object from encrypted objects] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string destination_object_name, std::string base64_aes256_key, std::vector compose_objects) { @@ -986,7 +986,7 @@ void WriteObjectWithKmsKey(google::cloud::storage::Client client, int& argc, //! [write object with kms key] [START storage_upload_with_kms_key] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string kms_key_name) { gcs::ObjectWriteStream stream = client.WriteObject( @@ -1026,7 +1026,7 @@ void RewriteObject(google::cloud::storage::Client client, int& argc, auto destination_object_name = ConsumeArg(argc, argv); //! [rewrite object] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string source_bucket_name, std::string source_object_name, std::string destination_bucket_name, std::string destination_object_name) { @@ -1060,7 +1060,7 @@ void RewriteObjectNonBlocking(google::cloud::storage::Client client, int& argc, auto destination_object_name = ConsumeArg(argc, argv); //! [rewrite object non blocking] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string source_bucket_name, std::string source_object_name, std::string destination_bucket_name, std::string destination_object_name) { @@ -1106,7 +1106,7 @@ void RewriteObjectToken(google::cloud::storage::Client client, int& argc, //! [rewrite object token] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string source_bucket_name, std::string source_object_name, std::string destination_bucket_name, std::string destination_object_name) { @@ -1147,7 +1147,7 @@ void RewriteObjectResume(google::cloud::storage::Client client, int& argc, //! [rewrite object resume] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string source_bucket_name, std::string source_object_name, std::string destination_bucket_name, std::string destination_object_name, std::string rewrite_token) { @@ -1194,7 +1194,7 @@ void RotateEncryptionKey(google::cloud::storage::Client client, int& argc, //! [rotate encryption key] [START storage_rotate_encryption_key] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name, std::string old_key_base64, std::string new_key_base64) { StatusOr object_metadata = @@ -1227,7 +1227,7 @@ void RenameObject(google::cloud::storage::Client client, int& argc, //! [rename object] [START storage_move_file] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string old_object_name, std::string new_object_name) { StatusOr object_metadata = @@ -1261,7 +1261,7 @@ void SetObjectEventBasedHold(google::cloud::storage::Client client, int& argc, auto object_name = ConsumeArg(argc, argv); //! [set event based hold] [START storage_set_event_based_hold] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name) { StatusOr original = client.GetObjectMetadata(bucket_name, object_name); @@ -1296,7 +1296,7 @@ void ReleaseObjectEventBasedHold(google::cloud::storage::Client client, auto object_name = ConsumeArg(argc, argv); //! [release event based hold] [START storage_release_event_based_hold] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name) { StatusOr original = client.GetObjectMetadata(bucket_name, object_name); @@ -1331,7 +1331,7 @@ void SetObjectTemporaryHold(google::cloud::storage::Client client, int& argc, auto object_name = ConsumeArg(argc, argv); //! [set temporary hold] [START storage_set_temporary_hold] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name) { StatusOr original = client.GetObjectMetadata(bucket_name, object_name); @@ -1366,7 +1366,7 @@ void ReleaseObjectTemporaryHold(google::cloud::storage::Client client, auto object_name = ConsumeArg(argc, argv); //! [release temporary hold] [START storage_release_temporary_hold] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name) { StatusOr original = client.GetObjectMetadata(bucket_name, object_name); @@ -1401,7 +1401,7 @@ void CreateGetSignedUrl(google::cloud::storage::Client client, int& argc, auto object_name = ConsumeArg(argc, argv); //! [sign url] [START storage_generate_signed_url] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name) { StatusOr signed_url = client.CreateV2SignedUrl( "GET", std::move(bucket_name), std::move(object_name), @@ -1429,7 +1429,7 @@ void CreatePutSignedUrl(google::cloud::storage::Client client, int& argc, auto object_name = ConsumeArg(argc, argv); //! [create put signed url] namespace gcs = google::cloud::storage; - using google::cloud::StatusOr; + using ::google::cloud::StatusOr; [](gcs::Client client, std::string bucket_name, std::string object_name) { StatusOr signed_url = client.CreateV2SignedUrl( "PUT", std::move(bucket_name), std::move(object_name), diff --git a/google/cloud/storage/internal/bucket_acl_requests_test.cc b/google/cloud/storage/internal/bucket_acl_requests_test.cc index 9f4512e8fd17e..c196caee27699 100644 --- a/google/cloud/storage/internal/bucket_acl_requests_test.cc +++ b/google/cloud/storage/internal/bucket_acl_requests_test.cc @@ -21,6 +21,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; TEST(BucketAclRequestTest, List) { diff --git a/google/cloud/storage/internal/bucket_requests.cc b/google/cloud/storage/internal/bucket_requests.cc index 93e1491357449..0af6302751147 100644 --- a/google/cloud/storage/internal/bucket_requests.cc +++ b/google/cloud/storage/internal/bucket_requests.cc @@ -233,7 +233,7 @@ StatusOr BucketMetadataParser::FromString( } std::string BucketMetadataToJsonString(BucketMetadata const& meta) { - using internal::nl::json; + using ::google::cloud::storage::internal::nl::json; json metadata_as_json; if (!meta.acl().empty()) { for (BucketAccessControl const& a : meta.acl()) { diff --git a/google/cloud/storage/internal/bucket_requests_test.cc b/google/cloud/storage/internal/bucket_requests_test.cc index 562c87f01d0da..8a7e3d4bc6234 100644 --- a/google/cloud/storage/internal/bucket_requests_test.cc +++ b/google/cloud/storage/internal/bucket_requests_test.cc @@ -23,6 +23,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::ElementsAre; using ::testing::HasSubstr; using ::testing::Not; diff --git a/google/cloud/storage/internal/compute_engine_util_test.cc b/google/cloud/storage/internal/compute_engine_util_test.cc index 36c21a75a5c5f..d17be8f2976b9 100644 --- a/google/cloud/storage/internal/compute_engine_util_test.cc +++ b/google/cloud/storage/internal/compute_engine_util_test.cc @@ -23,6 +23,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::google::cloud::internal::SetEnv; using ::google::cloud::internal::UnsetEnv; using ::google::cloud::testing_util::EnvironmentVariableRestore; diff --git a/google/cloud/storage/internal/curl_client_test.cc b/google/cloud/storage/internal/curl_client_test.cc index 9d998f585140a..cc16020a5f1a4 100644 --- a/google/cloud/storage/internal/curl_client_test.cc +++ b/google/cloud/storage/internal/curl_client_test.cc @@ -30,6 +30,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::google::cloud::storage::oauth2::Credentials; using ::testing::HasSubstr; diff --git a/google/cloud/storage/internal/curl_handle.cc b/google/cloud/storage/internal/curl_handle.cc index 3a10605abd8ec..1f99d465f7902 100644 --- a/google/cloud/storage/internal/curl_handle.cc +++ b/google/cloud/storage/internal/curl_handle.cc @@ -22,7 +22,8 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { -using google::cloud::storage::internal::BinaryDataAsDebugString; + +using ::google::cloud::storage::internal::BinaryDataAsDebugString; std::size_t const MAX_DATA_DEBUG_SIZE = 48; diff --git a/google/cloud/storage/internal/curl_resumable_upload_session_test.cc b/google/cloud/storage/internal/curl_resumable_upload_session_test.cc index 7b331cb88becf..2e6abeeaabb26 100644 --- a/google/cloud/storage/internal/curl_resumable_upload_session_test.cc +++ b/google/cloud/storage/internal/curl_resumable_upload_session_test.cc @@ -24,6 +24,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::_; using ::testing::Invoke; diff --git a/google/cloud/storage/internal/default_object_acl_requests_test.cc b/google/cloud/storage/internal/default_object_acl_requests_test.cc index c0d2780a0901d..49bd3d7f61c74 100644 --- a/google/cloud/storage/internal/default_object_acl_requests_test.cc +++ b/google/cloud/storage/internal/default_object_acl_requests_test.cc @@ -23,6 +23,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; TEST(DefaultObjectAclRequestTest, List) { diff --git a/google/cloud/storage/internal/format_rfc3339_test.cc b/google/cloud/storage/internal/format_rfc3339_test.cc index 865bfb4fbc702..247f99d0ac7a0 100644 --- a/google/cloud/storage/internal/format_rfc3339_test.cc +++ b/google/cloud/storage/internal/format_rfc3339_test.cc @@ -22,6 +22,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; TEST(FormatRfc3339Test, NoFractional) { diff --git a/google/cloud/storage/internal/generate_message_boundary_test.cc b/google/cloud/storage/internal/generate_message_boundary_test.cc index a725236ad5f1f..37eeedbeb3c82 100644 --- a/google/cloud/storage/internal/generate_message_boundary_test.cc +++ b/google/cloud/storage/internal/generate_message_boundary_test.cc @@ -22,6 +22,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; using ::testing::Not; diff --git a/google/cloud/storage/internal/hash_validator_test.cc b/google/cloud/storage/internal/hash_validator_test.cc index f660c528aa1ea..b1e4a2c4fdbfc 100644 --- a/google/cloud/storage/internal/hash_validator_test.cc +++ b/google/cloud/storage/internal/hash_validator_test.cc @@ -25,6 +25,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; // These values were obtained using: diff --git a/google/cloud/storage/internal/http_response_test.cc b/google/cloud/storage/internal/http_response_test.cc index 2337e60206645..f7fb15bef7bd3 100644 --- a/google/cloud/storage/internal/http_response_test.cc +++ b/google/cloud/storage/internal/http_response_test.cc @@ -21,7 +21,9 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; + TEST(HttpResponseTest, OStream) { HttpResponse response{ 404, "some-payload", {{"header1", "value1"}, {"header2", "value2"}}}; diff --git a/google/cloud/storage/internal/logging_client.cc b/google/cloud/storage/internal/logging_client.cc index 3c49f39c042a9..b1dc770f8e91c 100644 --- a/google/cloud/storage/internal/logging_client.cc +++ b/google/cloud/storage/internal/logging_client.cc @@ -25,7 +25,10 @@ inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { -using raw_client_wrapper_utils::CheckSignature; + +using ::google::cloud::storage::internal::raw_client_wrapper_utils:: + CheckSignature; + /** * Logs the input and results of each `RawClient` operation. * diff --git a/google/cloud/storage/internal/logging_client_test.cc b/google/cloud/storage/internal/logging_client_test.cc index 990c7d4b1667e..a022515542361 100644 --- a/google/cloud/storage/internal/logging_client_test.cc +++ b/google/cloud/storage/internal/logging_client_test.cc @@ -24,7 +24,8 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { -using google::cloud::storage::testing::canonical_errors::TransientError; + +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::HasSubstr; using ::testing::Invoke; diff --git a/google/cloud/storage/internal/logging_resumable_upload_session_test.cc b/google/cloud/storage/internal/logging_resumable_upload_session_test.cc index aaf249f4e5092..0277e5c8c4602 100644 --- a/google/cloud/storage/internal/logging_resumable_upload_session_test.cc +++ b/google/cloud/storage/internal/logging_resumable_upload_session_test.cc @@ -25,6 +25,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::google::cloud::testing_util::CaptureLogLinesBackend; using ::testing::_; using ::testing::HasSubstr; diff --git a/google/cloud/storage/internal/notification_requests_test.cc b/google/cloud/storage/internal/notification_requests_test.cc index 2d7d12ab2751e..1a02da7b9a3a5 100644 --- a/google/cloud/storage/internal/notification_requests_test.cc +++ b/google/cloud/storage/internal/notification_requests_test.cc @@ -23,6 +23,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; /// @test Verify that we parse JSON objects into NotificationMetadata objects. diff --git a/google/cloud/storage/internal/object_acl_requests_test.cc b/google/cloud/storage/internal/object_acl_requests_test.cc index a1bf78fd0691b..f304f463434b8 100644 --- a/google/cloud/storage/internal/object_acl_requests_test.cc +++ b/google/cloud/storage/internal/object_acl_requests_test.cc @@ -22,6 +22,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; /// @test Verify that we parse JSON objects into ObjectAccessControl objects. diff --git a/google/cloud/storage/internal/object_requests.cc b/google/cloud/storage/internal/object_requests.cc index 214e757a81eae..d5703ed931b0f 100644 --- a/google/cloud/storage/internal/object_requests.cc +++ b/google/cloud/storage/internal/object_requests.cc @@ -104,7 +104,7 @@ StatusOr ObjectMetadataParser::FromString( } internal::nl::json ObjectMetadataJsonForUpdate(ObjectMetadata const& meta) { - using internal::nl::json; + using ::google::cloud::storage::internal::nl::json; json metadata_as_json; if (!meta.acl().empty()) { for (ObjectAccessControl const& a : meta.acl()) { @@ -142,7 +142,7 @@ std::string ObjectMetadataJsonPayloadForUpdate(ObjectMetadata const& meta) { internal::nl::json ObjectMetadataJsonPayloadForCompose( ObjectMetadata const& meta) { - using internal::nl::json; + using ::google::cloud::storage::internal::nl::json; json metadata_as_json; if (!meta.acl().empty()) { for (ObjectAccessControl const& a : meta.acl()) { @@ -345,7 +345,7 @@ ComposeObjectRequest::ComposeObjectRequest( source_objects_(std::move(source_objects)) {} std::string ComposeObjectRequest::JsonPayload() const { - using internal::nl::json; + using ::google::cloud::storage::internal::nl::json; json compose_object_payload_json; compose_object_payload_json["kind"] = "storage#composeRequest"; json destination_metadata_payload; diff --git a/google/cloud/storage/internal/object_requests_test.cc b/google/cloud/storage/internal/object_requests_test.cc index c8257c9761a91..9cac76e447aa6 100644 --- a/google/cloud/storage/internal/object_requests_test.cc +++ b/google/cloud/storage/internal/object_requests_test.cc @@ -22,6 +22,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; TEST(ObjectRequestsTest, ParseFailure) { diff --git a/google/cloud/storage/internal/openssl_util.h b/google/cloud/storage/internal/openssl_util.h index 3950035a0d1da..e883d23d98e59 100644 --- a/google/cloud/storage/internal/openssl_util.h +++ b/google/cloud/storage/internal/openssl_util.h @@ -71,7 +71,7 @@ struct OpenSslUtils { static std::string SignStringWithPem( std::string const& str, std::string const& pem_contents, storage::oauth2::JwtSigningAlgorithms alg) { - using storage::oauth2::JwtSigningAlgorithms; + using ::google::cloud::storage::oauth2::JwtSigningAlgorithms; // We check for failures several times, so we shorten this into a lambda // to avoid bloating the code with alloc/init checks. diff --git a/google/cloud/storage/internal/parse_rfc3339_test.cc b/google/cloud/storage/internal/parse_rfc3339_test.cc index f97134c4d644d..c3a9cb568a884 100644 --- a/google/cloud/storage/internal/parse_rfc3339_test.cc +++ b/google/cloud/storage/internal/parse_rfc3339_test.cc @@ -22,6 +22,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::std::chrono::duration_cast; using ::std::chrono::milliseconds; using ::std::chrono::nanoseconds; diff --git a/google/cloud/storage/internal/retry_client.cc b/google/cloud/storage/internal/retry_client.cc index 4d2204b284142..d4412d2a35fa0 100644 --- a/google/cloud/storage/internal/retry_client.cc +++ b/google/cloud/storage/internal/retry_client.cc @@ -45,7 +45,9 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { -using raw_client_wrapper_utils::CheckSignature; + +using ::google::cloud::storage::internal::raw_client_wrapper_utils:: + CheckSignature; /** * Calls a client operation with retries borrowing the RPC policies. diff --git a/google/cloud/storage/internal/retry_client_test.cc b/google/cloud/storage/internal/retry_client_test.cc index e5133b82b2f38..bef1a75f70825 100644 --- a/google/cloud/storage/internal/retry_client_test.cc +++ b/google/cloud/storage/internal/retry_client_test.cc @@ -24,12 +24,13 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + +using ::google::cloud::testing_util::chrono_literals::operator"" _us; +using ::google::cloud::storage::testing::canonical_errors::PermanentError; +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::HasSubstr; using ::testing::Return; -using testing::canonical_errors::PermanentError; -using testing::canonical_errors::TransientError; -using namespace testing_util::chrono_literals; class RetryClientTest : public ::testing::Test { protected: diff --git a/google/cloud/storage/internal/retry_resumable_upload_session_test.cc b/google/cloud/storage/internal/retry_resumable_upload_session_test.cc index 5dceeee15b480..00e353ce48c54 100644 --- a/google/cloud/storage/internal/retry_resumable_upload_session_test.cc +++ b/google/cloud/storage/internal/retry_resumable_upload_session_test.cc @@ -26,13 +26,14 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + +using ::google::cloud::storage::testing::canonical_errors::PermanentError; +using ::google::cloud::storage::testing::canonical_errors::TransientError; +using ::google::cloud::testing_util::chrono_literals::operator"" _ms; using ::testing::_; using ::testing::HasSubstr; using ::testing::Invoke; using ::testing::Return; -using namespace testing_util::chrono_literals; -using storage::testing::canonical_errors::PermanentError; -using storage::testing::canonical_errors::TransientError; class RetryResumableUploadSessionTest : public ::testing::Test { protected: diff --git a/google/cloud/storage/internal/service_account_requests_test.cc b/google/cloud/storage/internal/service_account_requests_test.cc index 773513d5739ea..ccd509fd1be75 100644 --- a/google/cloud/storage/internal/service_account_requests_test.cc +++ b/google/cloud/storage/internal/service_account_requests_test.cc @@ -21,6 +21,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; TEST(ServiceAccountRequests, Get) { diff --git a/google/cloud/storage/internal/signed_url_requests_test.cc b/google/cloud/storage/internal/signed_url_requests_test.cc index 474f38ad92cf2..fdf76875e6e89 100644 --- a/google/cloud/storage/internal/signed_url_requests_test.cc +++ b/google/cloud/storage/internal/signed_url_requests_test.cc @@ -22,6 +22,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; TEST(SignedUrlRequests, Sign) { diff --git a/google/cloud/storage/list_buckets_reader_test.cc b/google/cloud/storage/list_buckets_reader_test.cc index 1edfbce18ae9e..8812959be5fef 100644 --- a/google/cloud/storage/list_buckets_reader_test.cc +++ b/google/cloud/storage/list_buckets_reader_test.cc @@ -23,16 +23,18 @@ namespace google { namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { -using internal::ListBucketsRequest; -using internal::ListBucketsResponse; +namespace { + +using ::google::cloud::storage::internal::ListBucketsRequest; +using ::google::cloud::storage::internal::ListBucketsResponse; +using ::google::cloud::storage::testing::MockClient; +using ::google::cloud::storage::testing::canonical_errors::PermanentError; +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::ContainerEq; using ::testing::Invoke; -using testing::MockClient; using ::testing::Return; -using testing::canonical_errors::PermanentError; -using testing::canonical_errors::TransientError; -namespace { + BucketMetadata CreateElement(int index) { std::string id = "bucket-" + std::to_string(index); std::string name = id; diff --git a/google/cloud/storage/list_objects_reader_test.cc b/google/cloud/storage/list_objects_reader_test.cc index 22c11abcf3a97..b90cc6db91b4c 100644 --- a/google/cloud/storage/list_objects_reader_test.cc +++ b/google/cloud/storage/list_objects_reader_test.cc @@ -24,11 +24,11 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -namespace nl = internal::nl; -using internal::ListObjectsRequest; -using internal::ListObjectsResponse; -using storage::testing::MockClient; -using storage::testing::canonical_errors::PermanentError; + +using ::google::cloud::storage::internal::ListObjectsRequest; +using ::google::cloud::storage::internal::ListObjectsResponse; +using ::google::cloud::storage::testing::MockClient; +using ::google::cloud::storage::testing::canonical_errors::PermanentError; using ::testing::_; using ::testing::ContainerEq; using ::testing::HasSubstr; diff --git a/google/cloud/storage/notification_metadata_test.cc b/google/cloud/storage/notification_metadata_test.cc index 33da9567799d4..551e4814d573e 100644 --- a/google/cloud/storage/notification_metadata_test.cc +++ b/google/cloud/storage/notification_metadata_test.cc @@ -23,6 +23,7 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + using ::testing::HasSubstr; NotificationMetadata CreateNotificationMetadataForTest() { diff --git a/google/cloud/storage/oauth2/authorized_user_credentials_test.cc b/google/cloud/storage/oauth2/authorized_user_credentials_test.cc index cd717268e0c74..77a30f38a430c 100644 --- a/google/cloud/storage/oauth2/authorized_user_credentials_test.cc +++ b/google/cloud/storage/oauth2/authorized_user_credentials_test.cc @@ -27,6 +27,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace oauth2 { namespace { + using ::google::cloud::storage::internal::HttpResponse; using ::google::cloud::storage::testing::MockHttpRequest; using ::google::cloud::storage::testing::MockHttpRequestBuilder; diff --git a/google/cloud/storage/oauth2/compute_engine_credentials_test.cc b/google/cloud/storage/oauth2/compute_engine_credentials_test.cc index 6a19f6dbdd239..6b8c1dad3eb3e 100644 --- a/google/cloud/storage/oauth2/compute_engine_credentials_test.cc +++ b/google/cloud/storage/oauth2/compute_engine_credentials_test.cc @@ -28,6 +28,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace oauth2 { namespace { + using ::google::cloud::storage::internal::GceMetadataHostname; using ::google::cloud::storage::internal::HttpResponse; using ::google::cloud::storage::testing::MockHttpRequest; diff --git a/google/cloud/storage/oauth2/google_application_default_credentials_file_test.cc b/google/cloud/storage/oauth2/google_application_default_credentials_file_test.cc index d13bee6238afe..84bbfbb7dabeb 100644 --- a/google/cloud/storage/oauth2/google_application_default_credentials_file_test.cc +++ b/google/cloud/storage/oauth2/google_application_default_credentials_file_test.cc @@ -23,6 +23,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace oauth2 { namespace { + using ::google::cloud::internal::SetEnv; using ::google::cloud::internal::UnsetEnv; using ::google::cloud::testing_util::EnvironmentVariableRestore; diff --git a/google/cloud/storage/oauth2/google_credentials_test.cc b/google/cloud/storage/oauth2/google_credentials_test.cc index 0e8fd80b652a2..06492b6c67cef 100644 --- a/google/cloud/storage/oauth2/google_credentials_test.cc +++ b/google/cloud/storage/oauth2/google_credentials_test.cc @@ -32,6 +32,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace oauth2 { namespace { + using ::google::cloud::internal::SetEnv; using ::google::cloud::internal::UnsetEnv; using ::google::cloud::storage::internal::GceCheckOverrideEnvVar; diff --git a/google/cloud/storage/oauth2/service_account_credentials.h b/google/cloud/storage/oauth2/service_account_credentials.h index 7cea95d9a553c..20ee49d3aaeaa 100644 --- a/google/cloud/storage/oauth2/service_account_credentials.h +++ b/google/cloud/storage/oauth2/service_account_credentials.h @@ -121,7 +121,7 @@ class ServiceAccountCredentials : public Credentials { * credentials. */ std::pair SignString(std::string const& text) const { - using storage::internal::OpenSslUtils; + using ::google::cloud::storage::internal::OpenSslUtils; return std::make_pair( Status(), OpenSslUtils::Base64Encode(OpenSslUtils::SignStringWithPem( text, info_.private_key, JwtSigningAlgorithms::RS256))); @@ -189,7 +189,7 @@ class ServiceAccountCredentials : public Credentials { std::string MakeJWTAssertion(storage::internal::nl::json const& header, storage::internal::nl::json const& payload, std::string const& pem_contents) { - using storage::internal::OpenSslUtils; + using ::google::cloud::storage::internal::OpenSslUtils; std::string encoded_header = OpenSslUtils::UrlsafeBase64Encode(header.dump()); std::string encoded_payload = diff --git a/google/cloud/storage/oauth2/service_account_credentials_test.cc b/google/cloud/storage/oauth2/service_account_credentials_test.cc index b2d12a2d4f189..78e25817fd13d 100644 --- a/google/cloud/storage/oauth2/service_account_credentials_test.cc +++ b/google/cloud/storage/oauth2/service_account_credentials_test.cc @@ -28,6 +28,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace oauth2 { namespace { + using ::google::cloud::storage::internal::HttpResponse; using ::google::cloud::storage::testing::MockHttpRequest; using ::google::cloud::storage::testing::MockHttpRequestBuilder; diff --git a/google/cloud/storage/object_test.cc b/google/cloud/storage/object_test.cc index 3d3af90cd6ab2..12b51bae86e48 100644 --- a/google/cloud/storage/object_test.cc +++ b/google/cloud/storage/object_test.cc @@ -26,13 +26,14 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + +using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::_; using ::testing::HasSubstr; using ::testing::Invoke; using ::testing::Return; using ::testing::ReturnRef; using ms = std::chrono::milliseconds; -using testing::canonical_errors::TransientError; /** * Test the functions in Storage::Client related to 'Objects: *'. diff --git a/google/cloud/storage/service_account_test.cc b/google/cloud/storage/service_account_test.cc index 45a558cabd50d..31f7cc9f65d42 100644 --- a/google/cloud/storage/service_account_test.cc +++ b/google/cloud/storage/service_account_test.cc @@ -20,6 +20,7 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + using ::testing::HasSubstr; ServiceAccount CreateServiceAccountForTest() { diff --git a/google/cloud/storage/storage_version_test.cc b/google/cloud/storage/storage_version_test.cc index 45adba8f82e3a..f13abe382d853 100644 --- a/google/cloud/storage/storage_version_test.cc +++ b/google/cloud/storage/storage_version_test.cc @@ -20,6 +20,8 @@ namespace google { namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { +namespace { + using ::testing::HasSubstr; using ::testing::Not; using ::testing::StartsWith; @@ -58,6 +60,7 @@ TEST(StorageVersionTest, HasBuildInfoInDevelopment) { HasSubstr("+" + google::cloud::internal::gitrev())); } +} // namespace } // namespace STORAGE_CLIENT_NS } // namespace storage } // namespace cloud diff --git a/google/cloud/storage/testing/retry_tests.h b/google/cloud/storage/testing/retry_tests.h index f9ef46a188cc5..fcd88f43ab1ac 100644 --- a/google/cloud/storage/testing/retry_tests.h +++ b/google/cloud/storage/testing/retry_tests.h @@ -54,7 +54,7 @@ void TooManyFailuresTest( ::testing::internal::TypedExpectation& oncall, std::function const& tested_operation, char const* api_name) { - using canonical_errors::TransientError; + using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::HasSubstr; using ::testing::Return; // A storage::Client with a simple to test policy. @@ -120,7 +120,7 @@ void NonIdempotentFailuresTest( ::testing::internal::TypedExpectation& oncall, std::function const& tested_operation, char const* api_name, bool has_will_repeatedly = false) { - using canonical_errors::TransientError; + using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::HasSubstr; using ::testing::Return; // A storage::Client with the strict idempotency policy, but with a generous @@ -187,7 +187,7 @@ void IdempotentFailuresTest( ::testing::internal::TypedExpectation& oncall, std::function const& tested_operation, char const* api_name, bool has_will_repeatedly = true) { - using canonical_errors::TransientError; + using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::HasSubstr; using ::testing::Return; // A storage::Client with the strict idempotency policy, but with a generous @@ -288,7 +288,7 @@ void PermanentFailureTest(Client& client, ::testing::internal::TypedExpectation& oncall, std::function tested_operation, char const* api_name) { - using canonical_errors::PermanentError; + using ::google::cloud::storage::testing::canonical_errors::PermanentError; using ::testing::HasSubstr; using ::testing::Return; #if GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS @@ -343,7 +343,7 @@ void TooManyFailuresStatusTest( ::testing::internal::TypedExpectation& oncall, std::function const& tested_operation, char const* api_name) { - using canonical_errors::TransientError; + using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::HasSubstr; using ::testing::Return; // A storage::Client with a simple to test policy. @@ -391,7 +391,7 @@ void NonIdempotentFailuresStatusTest( ::testing::internal::TypedExpectation& oncall, std::function const& tested_operation, char const* api_name) { - using canonical_errors::TransientError; + using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::HasSubstr; using ::testing::Return; // A storage::Client with the strict idempotency policy, but with a generous @@ -439,7 +439,7 @@ void IdempotentFailuresStatusTest( ::testing::internal::TypedExpectation& oncall, std::function const& tested_operation, char const* api_name) { - using canonical_errors::TransientError; + using ::google::cloud::storage::testing::canonical_errors::TransientError; using ::testing::HasSubstr; using ::testing::Return; // A storage::Client with the strict idempotency policy, and with an @@ -525,7 +525,7 @@ void PermanentFailureStatusTest( Client& client, ::testing::internal::TypedExpectation& oncall, std::function tested_operation, char const* api_name) { - using canonical_errors::PermanentError; + using ::google::cloud::storage::testing::canonical_errors::PermanentError; using ::testing::HasSubstr; using ::testing::Return; diff --git a/google/cloud/storage/tests/bucket_integration_test.cc b/google/cloud/storage/tests/bucket_integration_test.cc index 2bc1e572771f8..bc7d7748aecf7 100644 --- a/google/cloud/storage/tests/bucket_integration_test.cc +++ b/google/cloud/storage/tests/bucket_integration_test.cc @@ -24,7 +24,8 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -using google::cloud::storage::testing::TestPermanentFailure; + +using ::google::cloud::storage::testing::TestPermanentFailure; using ::testing::ElementsAreArray; using ::testing::HasSubstr; diff --git a/google/cloud/storage/tests/curl_download_request_integration_test.cc b/google/cloud/storage/tests/curl_download_request_integration_test.cc index 6c1a690f02535..15b12f9e1035c 100644 --- a/google/cloud/storage/tests/curl_download_request_integration_test.cc +++ b/google/cloud/storage/tests/curl_download_request_integration_test.cc @@ -25,14 +25,14 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { +namespace { + using ::testing::HasSubstr; -namespace { std::string HttpBinEndpoint() { return google::cloud::internal::GetEnv("HTTPBIN_ENDPOINT") .value_or("https://nghttp2.org/httpbin"); } -} // namespace TEST(CurlDownloadRequestTest, SimpleStream) { // httpbin can generate up to 100 lines, do not try to download more than @@ -75,6 +75,7 @@ TEST(CurlDownloadRequestTest, SimpleStream) { EXPECT_EQ(kDownloadedLines, count); } +} // namespace } // namespace internal } // namespace STORAGE_CLIENT_NS } // namespace storage diff --git a/google/cloud/storage/tests/curl_request_integration_test.cc b/google/cloud/storage/tests/curl_request_integration_test.cc index 538f6f6291311..9f8836ba5b534 100644 --- a/google/cloud/storage/tests/curl_request_integration_test.cc +++ b/google/cloud/storage/tests/curl_request_integration_test.cc @@ -27,7 +27,8 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { -using testing::HasSubstr; + +using ::testing::HasSubstr; std::string HttpBinEndpoint() { return google::cloud::internal::GetEnv("HTTPBIN_ENDPOINT") @@ -368,8 +369,8 @@ TEST(CurlRequestTest, Logging) { auto mock_logger = std::make_shared(); google::cloud::LogSink::Instance().AddBackend(mock_logger); - using testing::_; - using testing::Invoke; + using ::testing::_; + using ::testing::Invoke; std::string log_messages; EXPECT_CALL(*mock_logger, ProcessWithOwnership(_)) diff --git a/google/cloud/storage/tests/curl_resumable_streambuf_integration_test.cc b/google/cloud/storage/tests/curl_resumable_streambuf_integration_test.cc index 90c259603f16c..3c1f28639c286 100644 --- a/google/cloud/storage/tests/curl_resumable_streambuf_integration_test.cc +++ b/google/cloud/storage/tests/curl_resumable_streambuf_integration_test.cc @@ -27,6 +27,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; class ResumableStreambufTestEnvironment : public ::testing::Environment { diff --git a/google/cloud/storage/tests/curl_resumable_upload_session_integration_test.cc b/google/cloud/storage/tests/curl_resumable_upload_session_integration_test.cc index cb5a1ae5635b1..dee05c868839e 100644 --- a/google/cloud/storage/tests/curl_resumable_upload_session_integration_test.cc +++ b/google/cloud/storage/tests/curl_resumable_upload_session_integration_test.cc @@ -24,6 +24,7 @@ namespace storage { inline namespace STORAGE_CLIENT_NS { namespace internal { namespace { + using ::testing::HasSubstr; class ResumableUploadTestEnvironment : public ::testing::Environment { diff --git a/google/cloud/storage/tests/curl_streambuf_integration_test.cc b/google/cloud/storage/tests/curl_streambuf_integration_test.cc index ac35e5fc9408d..ae59c387f64c6 100644 --- a/google/cloud/storage/tests/curl_streambuf_integration_test.cc +++ b/google/cloud/storage/tests/curl_streambuf_integration_test.cc @@ -26,6 +26,7 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + using ::testing::HasSubstr; std::string HttpBinEndpoint() { diff --git a/google/cloud/storage/tests/curl_upload_request_integration_test.cc b/google/cloud/storage/tests/curl_upload_request_integration_test.cc index 4306915057ed7..bc200e98bf101 100644 --- a/google/cloud/storage/tests/curl_upload_request_integration_test.cc +++ b/google/cloud/storage/tests/curl_upload_request_integration_test.cc @@ -22,8 +22,6 @@ #include #include -using ::testing::HasSubstr; - namespace google { namespace cloud { namespace storage { diff --git a/google/cloud/storage/tests/object_checksum_integration_test.cc b/google/cloud/storage/tests/object_checksum_integration_test.cc index fd9233917a6f4..256d9e2d47acd 100644 --- a/google/cloud/storage/tests/object_checksum_integration_test.cc +++ b/google/cloud/storage/tests/object_checksum_integration_test.cc @@ -26,8 +26,9 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -using google::cloud::storage::testing::CountMatchingEntities; -using google::cloud::storage::testing::TestPermanentFailure; + +using ::google::cloud::storage::testing::CountMatchingEntities; +using ::google::cloud::storage::testing::TestPermanentFailure; using ::testing::HasSubstr; /// Store the project and instance captured from the command-line arguments. diff --git a/google/cloud/storage/tests/object_hash_integration_test.cc b/google/cloud/storage/tests/object_hash_integration_test.cc index a6d925a1ddf03..6efea5aa80420 100644 --- a/google/cloud/storage/tests/object_hash_integration_test.cc +++ b/google/cloud/storage/tests/object_hash_integration_test.cc @@ -28,8 +28,9 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -using google::cloud::storage::testing::CountMatchingEntities; -using google::cloud::storage::testing::TestPermanentFailure; + +using ::google::cloud::storage::testing::CountMatchingEntities; +using ::google::cloud::storage::testing::TestPermanentFailure; using ::testing::HasSubstr; /// Store the project and instance captured from the command-line arguments. diff --git a/google/cloud/storage/tests/object_insert_integration_test.cc b/google/cloud/storage/tests/object_insert_integration_test.cc index 998e1a8844a84..9ba3c39fc5afc 100644 --- a/google/cloud/storage/tests/object_insert_integration_test.cc +++ b/google/cloud/storage/tests/object_insert_integration_test.cc @@ -26,8 +26,9 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -using google::cloud::storage::testing::CountMatchingEntities; -using google::cloud::storage::testing::TestPermanentFailure; + +using ::google::cloud::storage::testing::CountMatchingEntities; +using ::google::cloud::storage::testing::TestPermanentFailure; using ::testing::HasSubstr; /// Store the project and instance captured from the command-line arguments. diff --git a/google/cloud/storage/tests/object_integration_test.cc b/google/cloud/storage/tests/object_integration_test.cc index 5759445259f3b..5aeec529726eb 100644 --- a/google/cloud/storage/tests/object_integration_test.cc +++ b/google/cloud/storage/tests/object_integration_test.cc @@ -27,8 +27,9 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -using google::cloud::storage::testing::CountMatchingEntities; -using google::cloud::storage::testing::TestPermanentFailure; + +using ::google::cloud::storage::testing::CountMatchingEntities; +using ::google::cloud::storage::testing::TestPermanentFailure; using ::testing::HasSubstr; /// Store the project and instance captured from the command-line arguments. diff --git a/google/cloud/storage/tests/object_media_integration_test.cc b/google/cloud/storage/tests/object_media_integration_test.cc index 690b2179e1e9a..cfd9ec03f9671 100644 --- a/google/cloud/storage/tests/object_media_integration_test.cc +++ b/google/cloud/storage/tests/object_media_integration_test.cc @@ -31,8 +31,9 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -using google::cloud::storage::testing::CountMatchingEntities; -using google::cloud::storage::testing::TestPermanentFailure; + +using ::google::cloud::storage::testing::CountMatchingEntities; +using ::google::cloud::storage::testing::TestPermanentFailure; using ::testing::HasSubstr; /// Store the project and instance captured from the command-line arguments. diff --git a/google/cloud/storage/tests/object_resumable_write_integration_test.cc b/google/cloud/storage/tests/object_resumable_write_integration_test.cc index 7108345bb0660..9e101288e9654 100644 --- a/google/cloud/storage/tests/object_resumable_write_integration_test.cc +++ b/google/cloud/storage/tests/object_resumable_write_integration_test.cc @@ -24,7 +24,8 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -using google::cloud::storage::testing::TestPermanentFailure; + +using ::google::cloud::storage::testing::TestPermanentFailure; using ::testing::HasSubstr; /// Store the project and instance captured from the command-line arguments. diff --git a/google/cloud/storage/tests/object_rewrite_integration_test.cc b/google/cloud/storage/tests/object_rewrite_integration_test.cc index bff37ff843ce1..d333703f46d07 100644 --- a/google/cloud/storage/tests/object_rewrite_integration_test.cc +++ b/google/cloud/storage/tests/object_rewrite_integration_test.cc @@ -27,8 +27,9 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { -using google::cloud::storage::testing::CountMatchingEntities; -using google::cloud::storage::testing::TestPermanentFailure; + +using ::google::cloud::storage::testing::CountMatchingEntities; +using ::google::cloud::storage::testing::TestPermanentFailure; using ::testing::HasSubstr; /// Store the project and instance captured from the command-line arguments. diff --git a/google/cloud/storage/tests/service_account_integration_test.cc b/google/cloud/storage/tests/service_account_integration_test.cc index a902665ef1f33..eed4b0fee75e2 100644 --- a/google/cloud/storage/tests/service_account_integration_test.cc +++ b/google/cloud/storage/tests/service_account_integration_test.cc @@ -22,6 +22,7 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + using ::testing::HasSubstr; /// Store the project and instance captured from the command-line arguments. diff --git a/google/cloud/storage/well_known_headers_test.cc b/google/cloud/storage/well_known_headers_test.cc index 3075234154416..27c5cb450c178 100644 --- a/google/cloud/storage/well_known_headers_test.cc +++ b/google/cloud/storage/well_known_headers_test.cc @@ -20,6 +20,7 @@ namespace cloud { namespace storage { inline namespace STORAGE_CLIENT_NS { namespace { + using ::testing::HasSubstr; /// @test Verify that CustomHeader works as expected.