Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33037416
D5989.1768410680.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D5989.1768410680.diff
View Options
diff --git a/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h b/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h
--- a/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h
+++ b/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h
@@ -66,7 +66,6 @@
virtual std::string getCurrentUserID() const = 0;
virtual void setDeviceID(std::string deviceID) const = 0;
virtual std::string getDeviceID() const = 0;
- virtual void clearSensitiveData() const = 0;
};
} // namespace comm
diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
@@ -65,7 +65,7 @@
std::string getCurrentUserID() const override;
void setDeviceID(std::string deviceID) const override;
std::string getDeviceID() const override;
- void clearSensitiveData() const override;
+ static void clearSensitiveData();
};
} // namespace comm
diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
@@ -1105,7 +1105,7 @@
return (entry == nullptr) ? "" : entry->data;
}
-void SQLiteQueryExecutor::clearSensitiveData() const {
+void SQLiteQueryExecutor::clearSensitiveData() {
if (file_exists(SQLiteQueryExecutor::sqliteFilePath) &&
std::remove(SQLiteQueryExecutor::sqliteFilePath.c_str())) {
std::ostringstream errorStream;
diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
--- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
+++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
@@ -1042,7 +1042,7 @@
taskType job = [this, promise]() {
std::string error;
try {
- DatabaseManager::getQueryExecutor().clearSensitiveData();
+ SQLiteQueryExecutor::clearSensitiveData();
} catch (const std::exception &e) {
error = e.what();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 5:11 PM (9 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5930455
Default Alt Text
D5989.1768410680.diff (2 KB)
Attached To
Mode
D5989: [native] refactor `clearSensitiveData()` method to static member of `SQLiteQueryExecutor`
Attached
Detach File
Event Timeline
Log In to Comment