OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This file defines specific implementation of BrowserDistribution class for | 5 // This file defines specific implementation of BrowserDistribution class for |
6 // Google Chrome. | 6 // Google Chrome. |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 | 9 |
10 #include <atlbase.h> | 10 #include <atlbase.h> |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 DCHECK(kuint32max > (url_path.size() * 3)); | 71 DCHECK(kuint32max > (url_path.size() * 3)); |
72 DWORD count = static_cast<DWORD>(url_path.size() * 3); | 72 DWORD count = static_cast<DWORD>(url_path.size() * 3); |
73 scoped_array<wchar_t> url_canon(new wchar_t[count]); | 73 scoped_array<wchar_t> url_canon(new wchar_t[count]); |
74 HRESULT hr = ::UrlCanonicalizeW(url_path.c_str(), url_canon.get(), | 74 HRESULT hr = ::UrlCanonicalizeW(url_path.c_str(), url_canon.get(), |
75 &count, URL_ESCAPE_UNSAFE); | 75 &count, URL_ESCAPE_UNSAFE); |
76 if (SUCCEEDED(hr)) | 76 if (SUCCEEDED(hr)) |
77 return std::wstring(url_canon.get()); | 77 return std::wstring(url_canon.get()); |
78 return url_path; | 78 return url_path; |
79 } | 79 } |
80 | 80 |
| 81 std::wstring GetCurrentTranslation() { |
| 82 return GetLanguageSelector().selected_translation(); |
| 83 } |
| 84 |
81 } // namespace installer | 85 } // namespace installer |
OLD | NEW |