| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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> |
| 9 |
| 8 #include <atlbase.h> | 10 #include <atlbase.h> |
| 9 | 11 |
| 10 #include "base/logging.h" | 12 #include "base/logging.h" |
| 11 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
| 12 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 13 #include "chrome/installer/util/language_selector.h" | 15 #include "chrome/installer/util/language_selector.h" |
| 14 | 16 |
| 15 namespace { | 17 namespace { |
| 16 | 18 |
| 17 const installer::LanguageSelector& GetLanguageSelector() { | 19 const installer::LanguageSelector& GetLanguageSelector() { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 DWORD count = static_cast<DWORD>(url_path.size() * 3); | 71 DWORD count = static_cast<DWORD>(url_path.size() * 3); |
| 70 scoped_array<wchar_t> url_canon(new wchar_t[count]); | 72 scoped_array<wchar_t> url_canon(new wchar_t[count]); |
| 71 HRESULT hr = ::UrlCanonicalizeW(url_path.c_str(), url_canon.get(), | 73 HRESULT hr = ::UrlCanonicalizeW(url_path.c_str(), url_canon.get(), |
| 72 &count, URL_ESCAPE_UNSAFE); | 74 &count, URL_ESCAPE_UNSAFE); |
| 73 if (SUCCEEDED(hr)) | 75 if (SUCCEEDED(hr)) |
| 74 return std::wstring(url_canon.get()); | 76 return std::wstring(url_canon.get()); |
| 75 return url_path; | 77 return url_path; |
| 76 } | 78 } |
| 77 | 79 |
| 78 } // namespace installer | 80 } // namespace installer |
| OLD | NEW |