Skip to content

Commit dc2d430

Browse files
Don't redeclare inherited state in CredentialsProviderDesktop
1 parent 49e9ede commit dc2d430

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

firestore/src/main/credentials_provider_desktop.cc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,6 @@ void FirebaseCppCredentialsProvider::GetToken(
188188
}
189189
}
190190

191-
void FirebaseCppCredentialsProvider::InvalidateToken() {
192-
std::lock_guard<std::recursive_mutex> lock(contents_->mutex);
193-
force_refresh_token_ = true;
194-
}
195-
196191
void FirebaseCppCredentialsProvider::AddAuthStateListener() {
197192
App& app = contents_->app;
198193
auto callback = reinterpret_cast<void*>(OnAuthStateChanged);
@@ -234,8 +229,8 @@ void FirebaseCppCredentialsProvider::RequestToken(
234229
// can fail if there is a token change while the request is outstanding.
235230
int expected_generation = contents_->token_generation;
236231

237-
bool force_refresh = force_refresh_token_;
238-
force_refresh_token_ = false;
232+
bool force_refresh = force_refresh_;
233+
force_refresh_ = false;
239234
auto future = GetAuthTokenAsync(contents_->app, force_refresh);
240235

241236
std::weak_ptr<Contents> weak_contents(contents_);

firestore/src/main/credentials_provider_desktop.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,6 @@ class FirebaseCppCredentialsProvider
109109
int token_generation = 0;
110110
};
111111
std::shared_ptr<Contents> contents_;
112-
113-
// Affects the next `GetToken` request; if `true`, the token will be refreshed
114-
// even if it hasn't expired yet.
115-
bool force_refresh_token_ = false;
116-
117-
// Provided by the user code; may be an empty function.
118-
firestore::credentials::CredentialChangeListener<firestore::credentials::User>
119-
change_listener_;
120112
};
121113

122114
} // namespace firestore

0 commit comments

Comments
 (0)