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/ui/toolbar/wrench_menu_model.h" | 5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 return l10n_util::GetStringUTF16(string_id); | 285 return l10n_util::GetStringUTF16(string_id); |
286 } | 286 } |
287 #endif | 287 #endif |
288 case IDC_VIEW_BACKGROUND_PAGES: { | 288 case IDC_VIEW_BACKGROUND_PAGES: { |
289 string16 num_background_pages = base::FormatNumber( | 289 string16 num_background_pages = base::FormatNumber( |
290 TaskManager::GetBackgroundPageCount()); | 290 TaskManager::GetBackgroundPageCount()); |
291 return l10n_util::GetStringFUTF16(IDS_VIEW_BACKGROUND_PAGES, | 291 return l10n_util::GetStringFUTF16(IDS_VIEW_BACKGROUND_PAGES, |
292 num_background_pages); | 292 num_background_pages); |
293 } | 293 } |
294 case IDC_UPGRADE_DIALOG: | 294 case IDC_UPGRADE_DIALOG: |
295 return l10n_util::GetStringUTF16(IDS_UPDATE_NOW); | 295 if (UpgradeDetector::GetInstance()->is_outdated_install()) { |
| 296 return l10n_util::GetStringFUTF16( |
| 297 IDS_UPGRADE_BUBBLE_TITLE, |
| 298 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME)); |
| 299 } else { |
| 300 return l10n_util::GetStringUTF16(IDS_UPDATE_NOW); |
| 301 } |
296 case IDC_SHOW_SIGNIN: { | 302 case IDC_SHOW_SIGNIN: { |
297 GlobalError* error = GetActiveSignedInServiceError(); | 303 GlobalError* error = GetActiveSignedInServiceError(); |
298 if (error) | 304 if (error) |
299 return error->MenuItemLabel(); | 305 return error->MenuItemLabel(); |
300 | 306 |
301 // No errors, so just display the signed in user, if any. | 307 // No errors, so just display the signed in user, if any. |
302 Profile* profile = browser_->profile()->GetOriginalProfile(); | 308 Profile* profile = browser_->profile()->GetOriginalProfile(); |
303 ProfileSyncService* service = profile->IsSyncAccessible() ? | 309 ProfileSyncService* service = profile->IsSyncAccessible() ? |
304 ProfileSyncServiceFactory::GetForProfile(profile) : NULL; | 310 ProfileSyncServiceFactory::GetForProfile(profile) : NULL; |
305 | 311 |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 // registration framework. | 755 // registration framework. |
750 if (profile->IsSyncAccessible()) { | 756 if (profile->IsSyncAccessible()) { |
751 ProfileSyncService* service = | 757 ProfileSyncService* service = |
752 ProfileSyncServiceFactory::GetForProfile(profile); | 758 ProfileSyncServiceFactory::GetForProfile(profile); |
753 SyncGlobalError* error = service->sync_global_error(); | 759 SyncGlobalError* error = service->sync_global_error(); |
754 if (error && error->HasBadge()) | 760 if (error && error->HasBadge()) |
755 return error; | 761 return error; |
756 } | 762 } |
757 return NULL; | 763 return NULL; |
758 } | 764 } |
OLD | NEW |