| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 AddSeparator(); | 518 AddSeparator(); |
| 519 | 519 |
| 520 if (browser_->profile()->GetOriginalProfile()->IsSyncAccessible()) { | 520 if (browser_->profile()->GetOriginalProfile()->IsSyncAccessible()) { |
| 521 const string16 short_product_name = | 521 const string16 short_product_name = |
| 522 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); | 522 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); |
| 523 AddItem(IDC_SHOW_SYNC_SETUP, l10n_util::GetStringFUTF16( | 523 AddItem(IDC_SHOW_SYNC_SETUP, l10n_util::GetStringFUTF16( |
| 524 IDS_SHOW_SYNC_SETUP, short_product_name)); | 524 IDS_SHOW_SYNC_SETUP, short_product_name)); |
| 525 AddSeparator(); | 525 AddSeparator(); |
| 526 } | 526 } |
| 527 | 527 |
| 528 #if defined(OS_MACOSX) | 528 #if defined(USE_AURA) |
| 529 #if defined(OS_WIN) |
| 530 AddItemWithStringId(IDC_OPTIONS, IDS_OPTIONS); |
| 531 #else |
| 529 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); | 532 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); |
| 530 #elif defined(USE_AURA) | 533 #endif |
| 534 #elif defined(OS_MACOSX) |
| 531 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); | 535 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); |
| 532 #elif defined(TOOLKIT_USES_GTK) | 536 #elif defined(TOOLKIT_USES_GTK) |
| 533 string16 preferences = gtk_util::GetStockPreferencesMenuLabel(); | 537 string16 preferences = gtk_util::GetStockPreferencesMenuLabel(); |
| 534 if (!preferences.empty()) | 538 if (!preferences.empty()) |
| 535 AddItem(IDC_OPTIONS, preferences); | 539 AddItem(IDC_OPTIONS, preferences); |
| 536 else | 540 else |
| 537 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); | 541 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); |
| 538 #else | 542 #else |
| 539 AddItemWithStringId(IDC_OPTIONS, IDS_OPTIONS); | 543 AddItemWithStringId(IDC_OPTIONS, IDS_OPTIONS); |
| 540 #endif | 544 #endif |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 &enable_increment, &enable_decrement); | 619 &enable_increment, &enable_decrement); |
| 616 } | 620 } |
| 617 zoom_label_ = l10n_util::GetStringFUTF16( | 621 zoom_label_ = l10n_util::GetStringFUTF16( |
| 618 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 622 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
| 619 } | 623 } |
| 620 | 624 |
| 621 string16 WrenchMenuModel::GetSyncMenuLabel() const { | 625 string16 WrenchMenuModel::GetSyncMenuLabel() const { |
| 622 return sync_ui_util::GetSyncMenuLabel( | 626 return sync_ui_util::GetSyncMenuLabel( |
| 623 browser_->profile()->GetOriginalProfile()->GetProfileSyncService()); | 627 browser_->profile()->GetOriginalProfile()->GetProfileSyncService()); |
| 624 } | 628 } |
| OLD | NEW |