Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: chrome/browser/views/toolbar_view.cc

Issue 338008: Resubmit http://codereview.chromium.org/314016 with views fixed (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/views/toolbar_view.h" 5 #include "chrome/browser/views/toolbar_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/drag_drop_types.h" 9 #include "app/drag_drop_types.h"
10 #include "app/gfx/canvas.h" 10 #include "app/gfx/canvas.h"
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 app_menu_contents_->AddItemWithStringId(IDC_SHOW_DOWNLOADS, 1168 app_menu_contents_->AddItemWithStringId(IDC_SHOW_DOWNLOADS,
1169 IDS_SHOW_DOWNLOADS); 1169 IDS_SHOW_DOWNLOADS);
1170 1170
1171 // Create the manage extensions menu item. 1171 // Create the manage extensions menu item.
1172 app_menu_contents_->AddItemWithStringId(IDC_MANAGE_EXTENSIONS, 1172 app_menu_contents_->AddItemWithStringId(IDC_MANAGE_EXTENSIONS,
1173 IDS_SHOW_EXTENSIONS); 1173 IDS_SHOW_EXTENSIONS);
1174 1174
1175 app_menu_contents_->AddSeparator(); 1175 app_menu_contents_->AddSeparator();
1176 #if defined(BROWSER_SYNC) 1176 #if defined(BROWSER_SYNC)
1177 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableSync)) { 1177 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableSync)) {
1178 std::wstring label; 1178 string16 label;
1179 std::wstring link; 1179 string16 link;
1180 // TODO(timsteele): Need a ui helper method to just get the type without 1180 // TODO(timsteele): Need a ui helper method to just get the type without
1181 // needing labels. 1181 // needing labels.
1182 SyncStatusUIHelper::MessageType type = SyncStatusUIHelper::GetLabels( 1182 SyncStatusUIHelper::MessageType type = SyncStatusUIHelper::GetLabels(
1183 browser_->profile()->GetProfileSyncService(), &label, &link); 1183 browser_->profile()->GetProfileSyncService(), &label, &link);
1184 label = type == SyncStatusUIHelper::SYNCED ? 1184 label = type == SyncStatusUIHelper::SYNCED ?
1185 l10n_util::GetString(IDS_SYNC_MENU_BOOKMARKS_SYNCED_LABEL) : 1185 l10n_util::GetStringUTF16(IDS_SYNC_MENU_BOOKMARKS_SYNCED_LABEL) :
1186 type == SyncStatusUIHelper::SYNC_ERROR ? 1186 type == SyncStatusUIHelper::SYNC_ERROR ?
1187 l10n_util::GetString(IDS_SYNC_MENU_BOOKMARK_SYNC_ERROR_LABEL) : 1187 l10n_util::GetStringUTF16(IDS_SYNC_MENU_BOOKMARK_SYNC_ERROR_LABEL) :
1188 l10n_util::GetString(IDS_SYNC_START_SYNC_BUTTON_LABEL); 1188 l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL);
1189 app_menu_contents_->AddItem(IDC_SYNC_BOOKMARKS, label); 1189 app_menu_contents_->AddItem(IDC_SYNC_BOOKMARKS, label);
1190 app_menu_contents_->AddSeparator(); 1190 app_menu_contents_->AddSeparator();
1191 } 1191 }
1192 #endif 1192 #endif
1193 app_menu_contents_->AddItem(IDC_OPTIONS, 1193 app_menu_contents_->AddItem(IDC_OPTIONS,
1194 l10n_util::GetStringFUTF16( 1194 l10n_util::GetStringFUTF16(
1195 IDS_OPTIONS, 1195 IDS_OPTIONS,
1196 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 1196 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
1197 app_menu_contents_->AddItem(IDC_ABOUT, 1197 app_menu_contents_->AddItem(IDC_ABOUT,
1198 l10n_util::GetStringFUTF16( 1198 l10n_util::GetStringFUTF16(
1199 IDS_ABOUT, 1199 IDS_ABOUT,
1200 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 1200 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
1201 app_menu_contents_->AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE); 1201 app_menu_contents_->AddItemWithStringId(IDC_HELP_PAGE, IDS_HELP_PAGE);
1202 app_menu_contents_->AddSeparator(); 1202 app_menu_contents_->AddSeparator();
1203 app_menu_contents_->AddItemWithStringId(IDC_EXIT, IDS_EXIT); 1203 app_menu_contents_->AddItemWithStringId(IDC_EXIT, IDS_EXIT);
1204 1204
1205 app_menu_menu_.reset(new views::Menu2(app_menu_contents_.get())); 1205 app_menu_menu_.reset(new views::Menu2(app_menu_contents_.get()));
1206 } 1206 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698