| 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 if (browser_->profile()->GetOriginalProfile()->IsSyncAccessible()) { | 492 if (browser_->profile()->GetOriginalProfile()->IsSyncAccessible()) { |
| 493 const string16 short_product_name = | 493 const string16 short_product_name = |
| 494 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); | 494 l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); |
| 495 AddItem(IDC_SHOW_SYNC_SETUP, l10n_util::GetStringFUTF16( | 495 AddItem(IDC_SHOW_SYNC_SETUP, l10n_util::GetStringFUTF16( |
| 496 IDS_SHOW_SYNC_SETUP, short_product_name)); | 496 IDS_SHOW_SYNC_SETUP, short_product_name)); |
| 497 AddSeparator(); | 497 AddSeparator(); |
| 498 } | 498 } |
| 499 | 499 |
| 500 #if defined(OS_MACOSX) | 500 #if defined(OS_MACOSX) |
| 501 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); | 501 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); |
| 502 #elif defined(USE_AURA) |
| 503 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); |
| 502 #elif defined(TOOLKIT_USES_GTK) | 504 #elif defined(TOOLKIT_USES_GTK) |
| 503 string16 preferences = gtk_util::GetStockPreferencesMenuLabel(); | 505 string16 preferences = gtk_util::GetStockPreferencesMenuLabel(); |
| 504 if (!preferences.empty()) | 506 if (!preferences.empty()) |
| 505 AddItem(IDC_OPTIONS, preferences); | 507 AddItem(IDC_OPTIONS, preferences); |
| 506 else | 508 else |
| 507 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); | 509 AddItemWithStringId(IDC_OPTIONS, IDS_PREFERENCES); |
| 508 #else | 510 #else |
| 509 AddItemWithStringId(IDC_OPTIONS, IDS_OPTIONS); | 511 AddItemWithStringId(IDC_OPTIONS, IDS_OPTIONS); |
| 510 #endif | 512 #endif |
| 511 | 513 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 &enable_increment, &enable_decrement); | 587 &enable_increment, &enable_decrement); |
| 586 } | 588 } |
| 587 zoom_label_ = l10n_util::GetStringFUTF16( | 589 zoom_label_ = l10n_util::GetStringFUTF16( |
| 588 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 590 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
| 589 } | 591 } |
| 590 | 592 |
| 591 string16 WrenchMenuModel::GetSyncMenuLabel() const { | 593 string16 WrenchMenuModel::GetSyncMenuLabel() const { |
| 592 return sync_ui_util::GetSyncMenuLabel( | 594 return sync_ui_util::GetSyncMenuLabel( |
| 593 browser_->profile()->GetOriginalProfile()->GetProfileSyncService()); | 595 browser_->profile()->GetOriginalProfile()->GetProfileSyncService()); |
| 594 } | 596 } |
| OLD | NEW |