| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 utility functions for fetching localized resources. | 5 // This file defines utility functions for fetching localized resources. |
| 6 | 6 |
| 7 #include "chrome/installer/util/l10n_string_util.h" | 7 #include "chrome/installer/util/l10n_string_util.h" |
| 8 | 8 |
| 9 #include <atlbase.h> | 9 #include <atlbase.h> |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
| 17 #include "chrome/installer/util/language_selector.h" | 17 #include "chrome/installer/util/language_selector.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 const installer::LanguageSelector& GetLanguageSelector() { | 21 const installer::LanguageSelector& GetLanguageSelector() { |
| 22 static const installer::LanguageSelector instance; | 22 static const installer::LanguageSelector instance; |
| 23 | 23 |
| 24 return instance; | 24 return instance; |
| 25 } | 25 } |
| 26 | 26 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 if (SUCCEEDED(hr)) | 89 if (SUCCEEDED(hr)) |
| 90 return std::wstring(url_canon.get()); | 90 return std::wstring(url_canon.get()); |
| 91 return url_path; | 91 return url_path; |
| 92 } | 92 } |
| 93 | 93 |
| 94 std::wstring GetCurrentTranslation() { | 94 std::wstring GetCurrentTranslation() { |
| 95 return GetLanguageSelector().selected_translation(); | 95 return GetLanguageSelector().selected_translation(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace installer | 98 } // namespace installer |
| OLD | NEW |