OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 522 |
523 std::wstring PreconfigurationValueFromRegistry(const std::wstring& preconfigNa
me) | 523 std::wstring PreconfigurationValueFromRegistry(const std::wstring& preconfigNa
me) |
524 { | 524 { |
525 try | 525 try |
526 { | 526 { |
527 AdblockPlus::RegistryKey regKey(HKEY_CURRENT_USER, L"Software\\AdblockPlus
"); | 527 AdblockPlus::RegistryKey regKey(HKEY_CURRENT_USER, L"Software\\AdblockPlus
"); |
528 return regKey.value_wstring(preconfigName); | 528 return regKey.value_wstring(preconfigName); |
529 } | 529 } |
530 catch (const std::runtime_error&) | 530 catch (const std::runtime_error&) |
531 { | 531 { |
532 return L""; | 532 try |
| 533 { |
| 534 AdblockPlus::RegistryKey regKey(HKEY_LOCAL_MACHINE, L"Software\\AdblockP
lus"); |
| 535 return regKey.value_wstring(preconfigName); |
| 536 } |
| 537 catch (const std::runtime_error&) |
| 538 { |
| 539 return L""; |
| 540 } |
533 } | 541 } |
534 } | 542 } |
535 | 543 |
536 std::auto_ptr<AdblockPlus::FilterEngine> CreateFilterEngine(const std::wstring&
locale) | 544 std::auto_ptr<AdblockPlus::FilterEngine> CreateFilterEngine(const std::wstring&
locale) |
537 { | 545 { |
538 AdblockPlus::AppInfo appInfo; | 546 AdblockPlus::AppInfo appInfo; |
539 appInfo.version = ToUtf8String(IEPLUGIN_VERSION); | 547 appInfo.version = ToUtf8String(IEPLUGIN_VERSION); |
540 appInfo.name = "adblockplusie"; | 548 appInfo.name = "adblockplusie"; |
541 #ifdef _WIN64 | 549 #ifdef _WIN64 |
542 appInfo.application = "msie64"; | 550 appInfo.application = "msie64"; |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 }); | 764 }); |
757 | 765 |
758 int retValue = _AtlModule.WinMain(cmdShow); | 766 int retValue = _AtlModule.WinMain(cmdShow); |
759 if (communicationThread.joinable()) | 767 if (communicationThread.joinable()) |
760 { | 768 { |
761 communicationThread.join(); | 769 communicationThread.join(); |
762 } | 770 } |
763 | 771 |
764 return retValue; | 772 return retValue; |
765 } | 773 } |
OLD | NEW |