OLD | NEW |
1 #include <atlbase.h> | 1 #include <atlbase.h> |
2 #include <shlwapi.h> | 2 #include <shlwapi.h> |
3 | 3 |
4 #include <map> | 4 #include <map> |
5 | 5 |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/scoped_ptr.h" |
7 #include "base/string_util.h" | 8 #include "base/string_util.h" |
8 | 9 |
9 #include "installer_util_strings.h" | 10 #include "installer_util_strings.h" |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 // Gets the language from the OS. If we're unable to get the system language, | 14 // Gets the language from the OS. If we're unable to get the system language, |
14 // defaults to en-us. | 15 // defaults to en-us. |
15 std::wstring GetSystemLanguage() { | 16 std::wstring GetSystemLanguage() { |
16 static std::wstring language; | 17 static std::wstring language; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 DWORD count = url_path.size() * 3; | 228 DWORD count = url_path.size() * 3; |
228 scoped_ptr<wchar_t> url_canon(new wchar_t[count]); | 229 scoped_ptr<wchar_t> url_canon(new wchar_t[count]); |
229 HRESULT hr = ::UrlCanonicalizeW(url_path.c_str(), url_canon.get(), | 230 HRESULT hr = ::UrlCanonicalizeW(url_path.c_str(), url_canon.get(), |
230 &count, URL_ESCAPE_UNSAFE); | 231 &count, URL_ESCAPE_UNSAFE); |
231 if (SUCCEEDED(hr)) | 232 if (SUCCEEDED(hr)) |
232 return std::wstring(url_canon.get()); | 233 return std::wstring(url_canon.get()); |
233 return url_path; | 234 return url_path; |
234 } | 235 } |
235 | 236 |
236 } // namespace installer_util | 237 } // namespace installer_util |
OLD | NEW |