diff options
author | Alexander Tkachev | 2016-06-09 13:49:52 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | af9930482e17f4b55e46707fc017090e4c24a38e (patch) | |
tree | e3a5592ff740f821b18693cff86f9fcd44b9de55 /backends/cloud/googledrive/googledrivestorage.cpp | |
parent | 4ff1ed5fe9ba86ccf5d7ad72dab8286c70ab7af3 (diff) | |
download | scummvm-rg350-af9930482e17f4b55e46707fc017090e4c24a38e.tar.gz scummvm-rg350-af9930482e17f4b55e46707fc017090e4c24a38e.tar.bz2 scummvm-rg350-af9930482e17f4b55e46707fc017090e4c24a38e.zip |
CLOUD: Update CloudManager
It now supports only one storage of each type. Only one Storage could be
loaded to the memory as well.
Options' Cloud tab now changes the Storage only when user pressed OK
button, giving the ability to look through the Storages without actually
changing them.
Diffstat (limited to 'backends/cloud/googledrive/googledrivestorage.cpp')
-rw-r--r-- | backends/cloud/googledrive/googledrivestorage.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/backends/cloud/googledrive/googledrivestorage.cpp b/backends/cloud/googledrive/googledrivestorage.cpp index 30ca1be7e6..18ddca5e94 100644 --- a/backends/cloud/googledrive/googledrivestorage.cpp +++ b/backends/cloud/googledrive/googledrivestorage.cpp @@ -121,15 +121,14 @@ void GoogleDriveStorage::codeFlowComplete(BoolResponse response) { return; } - ConfMan.removeKey("googledrive_code", "cloud"); - CloudMan.addStorage(this); + ConfMan.removeKey("googledrive_code", "cloud"); + CloudMan.replaceStorage(this, kStorageGoogleDriveId); ConfMan.flushToDisk(); debug("Done! You can use Google Drive now! Look:"); CloudMan.testFeature(); } -void GoogleDriveStorage::saveConfig(Common::String keyPrefix) { - ConfMan.set(keyPrefix + "type", "Google Drive", "cloud"); +void GoogleDriveStorage::saveConfig(Common::String keyPrefix) { ConfMan.set(keyPrefix + "access_token", _token, "cloud"); ConfMan.set(keyPrefix + "refresh_token", _refreshToken, "cloud"); } |