| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "chrome/browser/ui/webui/help/help_utils_chromeos.h" | 5 #include "chrome/browser/ui/webui/help/help_utils_chromeos.h" |
| 6 | 6 |
| 7 #include <algorithm> | |
| 8 | |
| 9 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/values.h" | 9 #include "base/values.h" |
| 11 #include "chrome/browser/chromeos/settings/cros_settings.h" | 10 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 11 #include "chrome/common/chrome_version_info.h" |
| 12 #include "chromeos/network/network_type_pattern.h" | 12 #include "chromeos/network/network_type_pattern.h" |
| 13 #include "chromeos/settings/cros_settings_names.h" | 13 #include "chromeos/settings/cros_settings_names.h" |
| 14 #include "grit/chromium_strings.h" | 14 #include "grit/chromium_strings.h" |
| 15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 16 #include "third_party/cros_system_api/dbus/service_constants.h" | 16 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 const bool kDefaultUpdateOverCellularAllowed = false; | 21 const bool kDefaultUpdateOverCellularAllowed = false; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 if (type == shill::kTypeBluetooth) | 57 if (type == shill::kTypeBluetooth) |
| 58 return l10n_util::GetStringUTF16(IDS_NETWORK_TYPE_BLUETOOTH); | 58 return l10n_util::GetStringUTF16(IDS_NETWORK_TYPE_BLUETOOTH); |
| 59 if (type == shill::kTypeCellular) | 59 if (type == shill::kTypeCellular) |
| 60 return l10n_util::GetStringUTF16(IDS_NETWORK_TYPE_CELLULAR); | 60 return l10n_util::GetStringUTF16(IDS_NETWORK_TYPE_CELLULAR); |
| 61 if (type == shill::kTypeVPN) | 61 if (type == shill::kTypeVPN) |
| 62 return l10n_util::GetStringUTF16(IDS_NETWORK_TYPE_VPN); | 62 return l10n_util::GetStringUTF16(IDS_NETWORK_TYPE_VPN); |
| 63 NOTREACHED(); | 63 NOTREACHED(); |
| 64 return base::string16(); | 64 return base::string16(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 base::string16 BuildBrowserVersionString() { |
| 68 chrome::VersionInfo version_info; |
| 69 DCHECK(version_info.is_valid()); |
| 70 |
| 71 std::string browser_version = version_info.Version(); |
| 72 std::string version_modifier = |
| 73 chrome::VersionInfo::GetVersionStringModifier(); |
| 74 if (!version_modifier.empty()) |
| 75 browser_version += " " + version_modifier; |
| 76 |
| 77 #if !defined(GOOGLE_CHROME_BUILD) |
| 78 browser_version += " ("; |
| 79 browser_version += version_info.LastChange(); |
| 80 browser_version += ")"; |
| 81 #endif |
| 82 |
| 83 #if defined(ARCH_CPU_64_BITS) |
| 84 browser_version += " (64-bit)"; |
| 85 #endif |
| 86 |
| 87 return base::UTF8ToUTF16(browser_version); |
| 88 } |
| 89 |
| 67 } // namespace help_utils_chromeos | 90 } // namespace help_utils_chromeos |
| OLD | NEW |