| 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 #include "chrome/browser/sync/about_sync_util.h" | 5 #include "chrome/browser/sync/about_sync_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Build a version string that matches MakeUserAgentForSyncApi with the | 143 // Build a version string that matches MakeUserAgentForSyncApi with the |
| 144 // addition of channel info and proper OS names. | 144 // addition of channel info and proper OS names. |
| 145 chrome::VersionInfo chrome_version; | 145 chrome::VersionInfo chrome_version; |
| 146 // GetVersionStringModifier returns empty string for stable channel or | 146 // GetVersionStringModifier returns empty string for stable channel or |
| 147 // unofficial builds, the channel string otherwise. We want to have "-devel" | 147 // unofficial builds, the channel string otherwise. We want to have "-devel" |
| 148 // for unofficial builds only. | 148 // for unofficial builds only. |
| 149 std::string version_modifier = | 149 std::string version_modifier = |
| 150 chrome::VersionInfo::GetVersionStringModifier(); | 150 chrome::VersionInfo::GetVersionStringModifier(); |
| 151 if (version_modifier.empty()) { | 151 if (version_modifier.empty()) { |
| 152 if (chrome::VersionInfo::GetChannel() != | 152 if (chrome::VersionInfo::GetChannel() != |
| 153 chrome::VersionInfo::CHANNEL_STABLE) { | 153 version_info::Channel::STABLE) { |
| 154 version_modifier = "-devel"; | 154 version_modifier = "-devel"; |
| 155 } | 155 } |
| 156 } else { | 156 } else { |
| 157 version_modifier = " " + version_modifier; | 157 version_modifier = " " + version_modifier; |
| 158 } | 158 } |
| 159 return chrome_version.Name() + " " + chrome_version.OSType() + " " + | 159 return chrome_version.Name() + " " + chrome_version.OSType() + " " + |
| 160 chrome_version.Version() + " (" + chrome_version.LastChange() + ")" + | 160 chrome_version.Version() + " (" + chrome_version.LastChange() + ")" + |
| 161 version_modifier; | 161 version_modifier; |
| 162 } | 162 } |
| 163 | 163 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 about_info->SetString("unrecoverable_error_message", | 484 about_info->SetString("unrecoverable_error_message", |
| 485 unrecoverable_error_message); | 485 unrecoverable_error_message); |
| 486 } | 486 } |
| 487 | 487 |
| 488 about_info->Set("type_status", service->GetTypeStatusMap()); | 488 about_info->Set("type_status", service->GetTypeStatusMap()); |
| 489 | 489 |
| 490 return about_info.Pass(); | 490 return about_info.Pass(); |
| 491 } | 491 } |
| 492 | 492 |
| 493 } // namespace sync_ui_util | 493 } // namespace sync_ui_util |
| OLD | NEW |