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

Side by Side Diff: chrome/browser/sync/sync_ui_util_mac.mm

Issue 6204002: Carnitas: Remove chrome/browser/views, update references. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yay, more syncing Created 9 years, 11 months 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
OLDNEW
1 // Copyright (c) 2009 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/sync/sync_ui_util_mac.h" 5 #include "chrome/browser/sync/sync_ui_util_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "app/l10n_util_mac.h" 9 #include "app/l10n_util_mac.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
(...skipping 21 matching lines...) Expand all
33 DCHECK_NE(syncItemIndex, -1); 33 DCHECK_NE(syncItemIndex, -1);
34 if ((syncItemIndex + 1) < [menu numberOfItems]) { 34 if ((syncItemIndex + 1) < [menu numberOfItems]) {
35 NSMenuItem* menuItem = [menu itemAtIndex:(syncItemIndex + 1)]; 35 NSMenuItem* menuItem = [menu itemAtIndex:(syncItemIndex + 1)];
36 if ([menuItem isSeparatorItem]) { 36 if ([menuItem isSeparatorItem]) {
37 followingSeparator = menuItem; 37 followingSeparator = menuItem;
38 } 38 }
39 } 39 }
40 } 40 }
41 41
42 // TODO(akalin): consolidate this code with the equivalent Windows code in 42 // TODO(akalin): consolidate this code with the equivalent Windows code in
43 // chrome/browser/views/toolbar_view.cc. 43 // chrome/browser/ui/views/toolbar_view.cc.
44 int titleId; 44 int titleId;
45 switch (status) { 45 switch (status) {
46 case sync_ui_util::SYNCED: 46 case sync_ui_util::SYNCED:
47 titleId = IDS_SYNC_MENU_SYNCED_LABEL; 47 titleId = IDS_SYNC_MENU_SYNCED_LABEL;
48 break; 48 break;
49 case sync_ui_util::SYNC_ERROR: 49 case sync_ui_util::SYNC_ERROR:
50 titleId = IDS_SYNC_MENU_SYNC_ERROR_LABEL; 50 titleId = IDS_SYNC_MENU_SYNC_ERROR_LABEL;
51 break; 51 break;
52 case sync_ui_util::PRE_SYNCED: 52 case sync_ui_util::PRE_SYNCED:
53 titleId = IDS_SYNC_START_SYNC_BUTTON_LABEL; 53 titleId = IDS_SYNC_START_SYNC_BUTTON_LABEL;
54 break; 54 break;
55 default: 55 default:
56 NOTREACHED(); 56 NOTREACHED();
57 // Needed to prevent release-mode warnings. 57 // Needed to prevent release-mode warnings.
58 titleId = IDS_SYNC_START_SYNC_BUTTON_LABEL; 58 titleId = IDS_SYNC_START_SYNC_BUTTON_LABEL;
59 break; 59 break;
60 } 60 }
61 NSString* title = l10n_util::GetNSStringWithFixup(titleId); 61 NSString* title = l10n_util::GetNSStringWithFixup(titleId);
62 [syncMenuItem setTitle:title]; 62 [syncMenuItem setTitle:title];
63 63
64 // If we don't have a sync service, hide any sync-related menu 64 // If we don't have a sync service, hide any sync-related menu
65 // items. However, sync_menu_item is enabled/disabled outside of this 65 // items. However, sync_menu_item is enabled/disabled outside of this
66 // function so we don't touch it here, and separators are always disabled. 66 // function so we don't touch it here, and separators are always disabled.
67 [syncMenuItem setHidden:!syncEnabled]; 67 [syncMenuItem setHidden:!syncEnabled];
68 [followingSeparator setHidden:!syncEnabled]; 68 [followingSeparator setHidden:!syncEnabled];
69 } 69 }
70 70
71 } // namespace sync_ui_util 71 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/speech/speech_input_bubble_views.cc ('k') | chrome/browser/ui/cocoa/about_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698