| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 27 matching lines...) Expand all Loading... |
| 38 { | 38 { |
| 39 return FileUrl(HtmlFolderPath() + L"firstRun.html"); | 39 return FileUrl(HtmlFolderPath() + L"firstRun.html"); |
| 40 } | 40 } |
| 41 | 41 |
| 42 std::wstring FileUrl(const std::wstring& path) | 42 std::wstring FileUrl(const std::wstring& path) |
| 43 { | 43 { |
| 44 std::wstring url = path; | 44 std::wstring url = path; |
| 45 std::replace(url.begin(), url.end(), L'\\', L'/'); | 45 std::replace(url.begin(), url.end(), L'\\', L'/'); |
| 46 return L"file:///" + url; | 46 return L"file:///" + url; |
| 47 } | 47 } |
| 48 |
| 49 std::wstring GetLocationUrl(IWebBrowser2& browser) |
| 50 { |
| 51 ATL::CComBSTR locationUrl; |
| 52 if (FAILED(browser.get_LocationURL(&locationUrl)) || !locationUrl) |
| 53 { |
| 54 return std::wstring(); |
| 55 } |
| 56 return std::wstring(locationUrl, locationUrl.Length()); |
| 57 } |
| OLD | NEW |