Left: | ||
Right: |
OLD | NEW |
---|---|
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 #include <algorithm> | 2 #include <algorithm> |
3 #include <stdexcept> | 3 #include <stdexcept> |
4 #include <vector> | 4 #include <vector> |
5 | 5 |
6 #include "../shared/Utils.h" | 6 #include "../shared/Utils.h" |
7 #include "PluginUtil.h" | 7 #include "PluginUtil.h" |
8 #include "PluginSettings.h" | 8 #include "PluginSettings.h" |
9 | 9 |
10 std::wstring HtmlFolderPath() | 10 std::wstring HtmlFolderPath() |
(...skipping 10 matching lines...) Expand all Loading... | |
21 { | 21 { |
22 return FileUrl(HtmlFolderPath() + L"firstRun.html"); | 22 return FileUrl(HtmlFolderPath() + L"firstRun.html"); |
23 } | 23 } |
24 | 24 |
25 std::wstring FileUrl(const std::wstring& path) | 25 std::wstring FileUrl(const std::wstring& path) |
26 { | 26 { |
27 std::wstring url = path; | 27 std::wstring url = path; |
28 std::replace(url.begin(), url.end(), L'\\', L'/'); | 28 std::replace(url.begin(), url.end(), L'\\', L'/'); |
29 return L"file:///" + url; | 29 return L"file:///" + url; |
30 } | 30 } |
31 | |
32 std::wstring GetLocationUrl(IWebBrowser2& browser) | |
33 { | |
34 std::wstring retValue; | |
Eric
2015/01/13 17:04:20
Use of this variable requires extraneous assignmen
sergei
2015/01/29 12:42:11
I've changed the body of this function and removed
| |
35 ATL::CComBSTR locationUrl; | |
36 if (SUCCEEDED(browser.get_LocationURL(&locationUrl)) && !!locationUrl) | |
Eric
2015/01/13 17:04:20
No need for double negation. Testing a converted p
| |
37 { | |
38 retValue.assign(locationUrl, locationUrl.Length()); | |
Eric
2015/01/13 17:04:20
return std::wstring(locationUrl, locationUrl.Lengt
| |
39 } | |
40 return retValue; | |
Eric
2015/01/13 17:04:20
return L"";
-- or --
return std:;wstring();
| |
41 } | |
OLD | NEW |