Index: src/engine/Main.cpp |
=================================================================== |
--- a/src/engine/Main.cpp |
+++ b/src/engine/Main.cpp |
@@ -87,6 +87,7 @@ |
CriticalSection updateCheckLock; |
bool firstRunActionExecuted = false; |
AdblockPlus::ReferrerMapping referrerMapping; |
+ std::string convertedFrom = ""; |
Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request) |
{ |
Communication::OutputBuffer response; |
@@ -367,6 +368,27 @@ |
} |
break; |
} |
+ case Communication::PROC_GET_CONVERTED_FROM: |
+ { |
+ if (convertedFrom != "") |
+ { |
+ response << convertedFrom; |
+ break; |
+ } |
+ std::wstring updatedFromKeyPath = L"Software\\Adblock Plus for IE\\ConvertedFrom"; |
+ try |
+ { |
+ AdblockPlus::RegistryKey updatedFromKey(HKEY_CURRENT_USER, updatedFromKeyPath); |
+ convertedFrom = ToUtf8String(updatedFromKey.value_wstring(L"name")); |
+ } |
+ catch(std::runtime_error) |
+ { |
+ break; |
+ } |
+ LONG res = RegDeleteKey(HKEY_CURRENT_USER, updatedFromKeyPath.c_str()); |
Eric
2015/08/10 17:08:49
Deleting the key immediately after returning its s
|
+ response << convertedFrom; |
+ break; |
+ } |
} |
return response; |
} |