| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 package org.chromium.base; | 5 package org.chromium.base; |
| 6 | 6 |
| 7 import java.util.Locale; | 7 import java.util.Locale; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * This class provides the locale related methods. | 10 * This class provides the locale related methods. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 return country.isEmpty() ? language : language + "-" + country; | 40 return country.isEmpty() ? language : language + "-" + country; |
| 41 } | 41 } |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * Get the default country code set during install. | 44 * Get the default country code set during install. |
| 45 * @return country code. | 45 * @return country code. |
| 46 */ | 46 */ |
| 47 @CalledByNative | 47 @CalledByNative |
| 48 private static String getDefaultCountryCode() { | 48 private static String getDefaultCountryCode() { |
| 49 CommandLine commandLine = CommandLine.getInstance(); | 49 CommandLine commandLine = CommandLine.getInstance(); |
| 50 return commandLine.hasSwitch(BaseSwitches.DEFAULT_COUNTRY_CODE_AT_INSTAL
L) ? | 50 return commandLine.hasSwitch(BaseSwitches.DEFAULT_COUNTRY_CODE_AT_INSTAL
L) |
| 51 commandLine.getSwitchValue(BaseSwitches.DEFAULT_COUNTRY_CODE_AT_
INSTALL) : | 51 ? commandLine.getSwitchValue(BaseSwitches.DEFAULT_COUNTRY_CODE_A
T_INSTALL) |
| 52 Locale.getDefault().getCountry(); | 52 : Locale.getDefault().getCountry(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 } | 55 } |
| OLD | NEW |