Skip to content

Commit

Permalink
Address review comments and rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
coryan committed Jul 11, 2023
1 parent eea788a commit d081031
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ci/cloudbuild/builds/check-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ io::run cmake "${cmake_args[@]}" \
-DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" \
-DCMAKE_CXX_FLAGS="-Og -Wno-maybe-uninitialized"
io::run cmake --build cmake-out
io::run cmake --install cmake-out #>/dev/null
io::run cmake --install cmake-out >/dev/null

if [ "${GOOGLE_CLOUD_CPP_CHECK_API:-}" ]; then
IFS=',' read -ra library_list <<<"${GOOGLE_CLOUD_CPP_CHECK_API}"
Expand Down
11 changes: 6 additions & 5 deletions google/cloud/access_token_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,23 @@ namespace {
class AccessTokenGeneratorImpl : public AccessTokenGenerator {
public:
explicit AccessTokenGeneratorImpl(
std::shared_ptr<google::cloud::oauth2_internal::Credentials> impl)
: impl_(std::move(impl)) {}
std::shared_ptr<google::cloud::oauth2_internal::Credentials> creds)
: creds_(std::move(creds)) {}
~AccessTokenGeneratorImpl() override = default;

StatusOr<AccessToken> GetToken() override {
return impl_->GetToken(std::chrono::system_clock::now());
return creds_->GetToken(std::chrono::system_clock::now());
}

private:
std::shared_ptr<google::cloud::oauth2_internal::Credentials> impl_;
std::shared_ptr<google::cloud::oauth2_internal::Credentials> creds_;
};

} // namespace

std::shared_ptr<AccessTokenGenerator> MakeAccessTokenGenerator(
std::shared_ptr<Credentials> credentials) { // NOLINT
// NOLINTNEXTLINE(performance-unnecessary-value-param)
std::shared_ptr<Credentials> credentials) {
return std::make_shared<AccessTokenGeneratorImpl>(
rest_internal::MapCredentials(credentials));
}
Expand Down

0 comments on commit d081031

Please # to comment.