summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/Services/google_service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CloudFile/src/Services/google_service.cpp')
-rw-r--r--plugins/CloudFile/src/Services/google_service.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/CloudFile/src/Services/google_service.cpp b/plugins/CloudFile/src/Services/google_service.cpp
index 605d023200..fe5baa91e3 100644
--- a/plugins/CloudFile/src/Services/google_service.cpp
+++ b/plugins/CloudFile/src/Services/google_service.cpp
@@ -41,7 +41,7 @@ bool CGDriveService::IsLoggedIn()
return now < expiresIn;
}
-void CGDriveService::Login()
+void CGDriveService::Login(HWND owner)
{
ptrA token(getStringA("TokenSecret"));
ptrA refreshToken(getStringA("RefreshToken"));
@@ -62,6 +62,7 @@ void CGDriveService::Login()
}
COAuthDlg dlg(this, GOOGLE_AUTH, RequestAccessTokenThread);
+ dlg.SetParent(owner);
dlg.DoModal();
}
@@ -137,6 +138,10 @@ unsigned CGDriveService::RevokeAccessTokenThread(void *param)
GDriveAPI::RevokeAccessTokenRequest request(token);
NLHR_PTR response(request.Send(service->m_hConnection));
+ service->delSetting("ExpiresIn");
+ service->delSetting("TokenSecret");
+ service->delSetting("RefreshToken");
+
return 0;
}