OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" | 7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |
8 | 8 |
9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 | 807 |
808 - (IBAction)switchToProfile:(id)sender { | 808 - (IBAction)switchToProfile:(id)sender { |
809 // Check the event flags to see if a new window should be created. | 809 // Check the event flags to see if a new window should be created. |
810 bool alwaysCreate = ui::WindowOpenDispositionFromNSEvent( | 810 bool alwaysCreate = ui::WindowOpenDispositionFromNSEvent( |
811 [NSApp currentEvent]) == NEW_WINDOW; | 811 [NSApp currentEvent]) == NEW_WINDOW; |
812 avatarMenu_->SwitchToProfile([sender tag], alwaysCreate, | 812 avatarMenu_->SwitchToProfile([sender tag], alwaysCreate, |
813 ProfileMetrics::SWITCH_PROFILE_ICON); | 813 ProfileMetrics::SWITCH_PROFILE_ICON); |
814 } | 814 } |
815 | 815 |
816 - (IBAction)showUserManager:(id)sender { | 816 - (IBAction)showUserManager:(id)sender { |
817 profiles::ShowUserManagerMaybeWithTutorial(browser_->profile()); | 817 chrome::ShowUserManager(browser_->profile()->GetPath()); |
818 [self postActionPerformed: | 818 [self postActionPerformed: |
819 ProfileMetrics::PROFILE_DESKTOP_MENU_OPEN_USER_MANAGER]; | 819 ProfileMetrics::PROFILE_DESKTOP_MENU_OPEN_USER_MANAGER]; |
820 } | 820 } |
821 | 821 |
822 - (IBAction)exitGuest:(id)sender { | 822 - (IBAction)exitGuest:(id)sender { |
823 DCHECK(browser_->profile()->IsGuestSession()); | 823 DCHECK(browser_->profile()->IsGuestSession()); |
824 [self showUserManager:sender]; | 824 chrome::ShowUserManager(base::FilePath()); |
825 profiles::CloseGuestProfileWindows(); | 825 profiles::CloseGuestProfileWindows(); |
826 } | 826 } |
827 | 827 |
828 - (IBAction)goIncognito:(id)sender { | 828 - (IBAction)goIncognito:(id)sender { |
829 DCHECK([self shouldShowGoIncognito]); | 829 DCHECK([self shouldShowGoIncognito]); |
830 chrome::NewIncognitoWindow(browser_); | 830 chrome::NewIncognitoWindow(browser_); |
831 } | 831 } |
832 | 832 |
833 - (IBAction)showAccountManagement:(id)sender { | 833 - (IBAction)showAccountManagement:(id)sender { |
834 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT]; | 834 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT]; |
835 } | 835 } |
836 | 836 |
837 - (IBAction)hideAccountManagement:(id)sender { | 837 - (IBAction)hideAccountManagement:(id)sender { |
838 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER]; | 838 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER]; |
839 } | 839 } |
840 | 840 |
841 - (IBAction)lockProfile:(id)sender { | 841 - (IBAction)lockProfile:(id)sender { |
842 profiles::LockProfile(browser_->profile()); | 842 profiles::LockProfile(browser_->profile()); |
843 [self postActionPerformed:ProfileMetrics::PROFILE_DESKTOP_MENU_LOCK]; | 843 [self postActionPerformed:ProfileMetrics::PROFILE_DESKTOP_MENU_LOCK]; |
844 } | 844 } |
845 | 845 |
846 - (IBAction)showInlineSigninPage:(id)sender { | 846 - (IBAction)showInlineSigninPage:(id)sender { |
847 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN]; | 847 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN]; |
848 } | 848 } |
849 | 849 |
850 | |
851 - (IBAction)addAccount:(id)sender { | 850 - (IBAction)addAccount:(id)sender { |
852 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT]; | 851 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT]; |
853 [self postActionPerformed:ProfileMetrics::PROFILE_DESKTOP_MENU_ADD_ACCT]; | 852 [self postActionPerformed:ProfileMetrics::PROFILE_DESKTOP_MENU_ADD_ACCT]; |
854 } | 853 } |
855 | 854 |
856 - (IBAction)navigateBackFromSigninPage:(id)sender { | 855 - (IBAction)navigateBackFromSigninPage:(id)sender { |
857 std::string primaryAccount = SigninManagerFactory::GetForProfile( | 856 std::string primaryAccount = SigninManagerFactory::GetForProfile( |
858 browser_->profile())->GetAuthenticatedUsername(); | 857 browser_->profile())->GetAuthenticatedUsername(); |
859 bool hasAccountManagement = !primaryAccount.empty() && | 858 bool hasAccountManagement = !primaryAccount.empty() && |
860 switches::IsEnableAccountConsistency(); | 859 switches::IsEnableAccountConsistency(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 | 917 |
919 - (IBAction)syncSettingsConfirmed:(id)sender { | 918 - (IBAction)syncSettingsConfirmed:(id)sender { |
920 tutorialMode_ = profiles::TUTORIAL_MODE_NONE; | 919 tutorialMode_ = profiles::TUTORIAL_MODE_NONE; |
921 LoginUIServiceFactory::GetForProfile(browser_->profile())-> | 920 LoginUIServiceFactory::GetForProfile(browser_->profile())-> |
922 SyncConfirmationUIClosed(false); | 921 SyncConfirmationUIClosed(false); |
923 ProfileMetrics::LogProfileNewAvatarMenuSignin( | 922 ProfileMetrics::LogProfileNewAvatarMenuSignin( |
924 ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_OK); | 923 ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_OK); |
925 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER]; | 924 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER]; |
926 } | 925 } |
927 | 926 |
928 - (IBAction)addPerson:(id)sender { | |
929 profiles::ShowUserManagerMaybeWithTutorial(browser_->profile()); | |
930 ProfileMetrics::LogProfileNewAvatarMenuNotYou( | |
931 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_ADD_PERSON); | |
932 } | |
933 | |
934 - (IBAction)disconnectProfile:(id)sender { | 927 - (IBAction)disconnectProfile:(id)sender { |
935 chrome::ShowSettings(browser_); | 928 chrome::ShowSettings(browser_); |
936 ProfileMetrics::LogProfileNewAvatarMenuNotYou( | 929 ProfileMetrics::LogProfileNewAvatarMenuNotYou( |
937 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_DISCONNECT); | 930 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_DISCONNECT); |
938 } | 931 } |
939 | 932 |
940 - (IBAction)navigateBackFromSwitchUserView:(id)sender { | 933 - (IBAction)navigateBackFromSwitchUserView:(id)sender { |
941 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER]; | 934 [self initMenuContentsWithView:profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER]; |
942 ProfileMetrics::LogProfileNewAvatarMenuNotYou( | 935 ProfileMetrics::LogProfileNewAvatarMenuNotYou( |
943 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_BACK); | 936 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_BACK); |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 linkMessage:linkMessage | 1169 linkMessage:linkMessage |
1177 buttonMessage:buttonMessage | 1170 buttonMessage:buttonMessage |
1178 linkAction:@selector(configureSyncSettings:) | 1171 linkAction:@selector(configureSyncSettings:) |
1179 buttonAction:@selector(syncSettingsConfirmed:)]; | 1172 buttonAction:@selector(syncSettingsConfirmed:)]; |
1180 } | 1173 } |
1181 | 1174 |
1182 - (NSView*)buildWelcomeUpgradeTutorialViewIfNeeded { | 1175 - (NSView*)buildWelcomeUpgradeTutorialViewIfNeeded { |
1183 Profile* profile = browser_->profile(); | 1176 Profile* profile = browser_->profile(); |
1184 const AvatarMenu::Item& avatarItem = | 1177 const AvatarMenu::Item& avatarItem = |
1185 avatarMenu_->GetItemAt(avatarMenu_->GetActiveProfileIndex()); | 1178 avatarMenu_->GetItemAt(avatarMenu_->GetActiveProfileIndex()); |
1186 if (!avatarItem.signed_in) { | |
1187 profile->GetPrefs()->SetInteger( | |
1188 prefs::kProfileAvatarTutorialShown, | |
1189 signin_ui_util::kUpgradeWelcomeTutorialShowMax + 1); | |
1190 return nil; | |
1191 } | |
1192 | 1179 |
1193 const int showCount = profile->GetPrefs()->GetInteger( | 1180 const int showCount = profile->GetPrefs()->GetInteger( |
1194 prefs::kProfileAvatarTutorialShown); | 1181 prefs::kProfileAvatarTutorialShown); |
1195 // Do not show the tutorial if user has dismissed it. | 1182 // Do not show the tutorial if user has dismissed it. |
1196 if (showCount > signin_ui_util::kUpgradeWelcomeTutorialShowMax) | 1183 if (showCount > signin_ui_util::kUpgradeWelcomeTutorialShowMax) |
1197 return nil; | 1184 return nil; |
1198 | 1185 |
1199 if (tutorialMode_ != profiles::TUTORIAL_MODE_WELCOME_UPGRADE) { | 1186 if (tutorialMode_ != profiles::TUTORIAL_MODE_WELCOME_UPGRADE) { |
1200 if (showCount == signin_ui_util::kUpgradeWelcomeTutorialShowMax) | 1187 if (showCount == signin_ui_util::kUpgradeWelcomeTutorialShowMax) |
1201 return nil; | 1188 return nil; |
1202 profile->GetPrefs()->SetInteger( | 1189 profile->GetPrefs()->SetInteger( |
1203 prefs::kProfileAvatarTutorialShown, showCount + 1); | 1190 prefs::kProfileAvatarTutorialShown, showCount + 1); |
1204 } | 1191 } |
1205 | 1192 |
1206 ProfileMetrics::LogProfileNewAvatarMenuUpgrade( | 1193 ProfileMetrics::LogProfileNewAvatarMenuUpgrade( |
1207 ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_VIEW); | 1194 ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_VIEW); |
1208 | 1195 |
1209 NSString* titleMessage = l10n_util::GetNSString( | 1196 NSString* titleMessage = l10n_util::GetNSString( |
1210 IDS_PROFILES_WELCOME_UPGRADE_TUTORIAL_TITLE); | 1197 IDS_PROFILES_WELCOME_UPGRADE_TUTORIAL_TITLE); |
1211 NSString* contentMessage = l10n_util::GetNSString( | 1198 NSString* contentMessage = l10n_util::GetNSString( |
1212 IDS_PROFILES_WELCOME_UPGRADE_TUTORIAL_CONTENT_TEXT); | 1199 IDS_PROFILES_WELCOME_UPGRADE_TUTORIAL_CONTENT_TEXT); |
1213 NSString* linkMessage = l10n_util::GetNSStringF( | 1200 // For local profiles, the "Not you" link doesn't make sense. |
1214 IDS_PROFILES_NOT_YOU, avatarItem.name); | 1201 NSString* linkMessage = avatarItem.signed_in ? |
| 1202 l10n_util::GetNSStringF(IDS_PROFILES_NOT_YOU, avatarItem.name) : nil; |
1215 NSString* buttonMessage = l10n_util::GetNSString( | 1203 NSString* buttonMessage = l10n_util::GetNSString( |
1216 IDS_PROFILES_TUTORIAL_WHATS_NEW_BUTTON); | 1204 IDS_PROFILES_TUTORIAL_WHATS_NEW_BUTTON); |
1217 return [self tutorialViewWithMode:profiles::TUTORIAL_MODE_WELCOME_UPGRADE | 1205 return [self tutorialViewWithMode:profiles::TUTORIAL_MODE_WELCOME_UPGRADE |
1218 titleMessage:titleMessage | 1206 titleMessage:titleMessage |
1219 contentMessage:contentMessage | 1207 contentMessage:contentMessage |
1220 linkMessage:linkMessage | 1208 linkMessage:linkMessage |
1221 buttonMessage:buttonMessage | 1209 buttonMessage:buttonMessage |
1222 linkAction:@selector(showSwitchUserView:) | 1210 linkAction:@selector(showSwitchUserView:) |
1223 buttonAction:@selector(seeWhatsNew:)]; | 1211 buttonAction:@selector(seeWhatsNew:)]; |
1224 } | 1212 } |
(...skipping 23 matching lines...) Expand all Loading... |
1248 [tutorialOkButton setTarget:self]; | 1236 [tutorialOkButton setTarget:self]; |
1249 [tutorialOkButton setAction:buttonAction]; | 1237 [tutorialOkButton setAction:buttonAction]; |
1250 [tutorialOkButton sizeToFit]; | 1238 [tutorialOkButton sizeToFit]; |
1251 NSSize buttonSize = [tutorialOkButton frame].size; | 1239 NSSize buttonSize = [tutorialOkButton frame].size; |
1252 const CGFloat kTopBottomTextPadding = 6; | 1240 const CGFloat kTopBottomTextPadding = 6; |
1253 const CGFloat kLeftRightTextPadding = 15; | 1241 const CGFloat kLeftRightTextPadding = 15; |
1254 buttonSize.width += 2 * kLeftRightTextPadding; | 1242 buttonSize.width += 2 * kLeftRightTextPadding; |
1255 buttonSize.height += 2 * kTopBottomTextPadding; | 1243 buttonSize.height += 2 * kTopBottomTextPadding; |
1256 [tutorialOkButton setFrameSize:buttonSize]; | 1244 [tutorialOkButton setFrameSize:buttonSize]; |
1257 [tutorialOkButton setAlignment:NSCenterTextAlignment]; | 1245 [tutorialOkButton setAlignment:NSCenterTextAlignment]; |
| 1246 |
1258 [tutorialOkButton setFrameOrigin:NSMakePoint( | 1247 [tutorialOkButton setFrameOrigin:NSMakePoint( |
1259 kFixedMenuWidth - NSWidth([tutorialOkButton frame]) - kHorizontalSpacing, | 1248 kFixedMenuWidth - NSWidth([tutorialOkButton frame]) - kHorizontalSpacing, |
1260 yOffset)]; | 1249 yOffset)]; |
1261 [container addSubview:tutorialOkButton]; | 1250 [container addSubview:tutorialOkButton]; |
1262 | 1251 |
1263 NSButton* learnMoreLink = | 1252 if (linkMessage) { |
1264 [self linkButtonWithTitle:linkMessage | 1253 NSButton* learnMoreLink = |
1265 frameOrigin:NSZeroPoint | 1254 [self linkButtonWithTitle:linkMessage |
1266 action:linkAction]; | 1255 frameOrigin:NSZeroPoint |
1267 [[learnMoreLink cell] setTextColor:[NSColor whiteColor]]; | 1256 action:linkAction]; |
1268 CGFloat linkYOffset = yOffset + (NSHeight([tutorialOkButton frame]) - | 1257 [[learnMoreLink cell] setTextColor:[NSColor whiteColor]]; |
1269 NSHeight([learnMoreLink frame])) / 2; | 1258 CGFloat linkYOffset = yOffset + (NSHeight([tutorialOkButton frame]) - |
1270 [learnMoreLink setFrameOrigin:NSMakePoint(kHorizontalSpacing, linkYOffset)]; | 1259 NSHeight([learnMoreLink frame])) / 2; |
1271 [container addSubview:learnMoreLink]; | 1260 [learnMoreLink setFrameOrigin:NSMakePoint(kHorizontalSpacing, linkYOffset)]; |
1272 | 1261 [container addSubview:learnMoreLink]; |
1273 yOffset = std::max(NSMaxY([learnMoreLink frame]), | 1262 yOffset = std::max(NSMaxY([learnMoreLink frame]), |
1274 NSMaxY([tutorialOkButton frame])) + kVerticalSpacing; | 1263 NSMaxY([tutorialOkButton frame])) + kVerticalSpacing; |
1275 | 1264 } else { |
| 1265 yOffset = NSMaxY([tutorialOkButton frame]) + kVerticalSpacing; |
| 1266 } |
1276 // Adds body content. | 1267 // Adds body content. |
1277 NSTextField* contentLabel = BuildLabel( | 1268 NSTextField* contentLabel = BuildLabel( |
1278 contentMessage, | 1269 contentMessage, |
1279 NSMakePoint(kHorizontalSpacing, yOffset), | 1270 NSMakePoint(kHorizontalSpacing, yOffset), |
1280 gfx::SkColorToSRGBNSColor(profiles::kAvatarTutorialContentTextColor)); | 1271 gfx::SkColorToSRGBNSColor(profiles::kAvatarTutorialContentTextColor)); |
1281 [contentLabel setFrameSize:NSMakeSize(availableWidth, 0)]; | 1272 [contentLabel setFrameSize:NSMakeSize(availableWidth, 0)]; |
1282 [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:contentLabel]; | 1273 [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:contentLabel]; |
1283 [container addSubview:contentLabel]; | 1274 [container addSubview:contentLabel]; |
1284 yOffset = NSMaxY([contentLabel frame]) + kSmallVerticalSpacing; | 1275 yOffset = NSMaxY([contentLabel frame]) + kSmallVerticalSpacing; |
1285 | 1276 |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1772 l10n_util::GetNSString(IDS_PROFILES_ACCOUNT_REMOVAL_TITLE), | 1763 l10n_util::GetNSString(IDS_PROFILES_ACCOUNT_REMOVAL_TITLE), |
1773 self /* backButtonTarget*/, | 1764 self /* backButtonTarget*/, |
1774 @selector(showAccountManagement:) /* backButtonAction */); | 1765 @selector(showAccountManagement:) /* backButtonAction */); |
1775 [container addSubview:titleView]; | 1766 [container addSubview:titleView]; |
1776 yOffset = NSMaxY([titleView frame]); | 1767 yOffset = NSMaxY([titleView frame]); |
1777 | 1768 |
1778 [container setFrameSize:NSMakeSize(kFixedAccountRemovalViewWidth, yOffset)]; | 1769 [container setFrameSize:NSMakeSize(kFixedAccountRemovalViewWidth, yOffset)]; |
1779 return container.autorelease(); | 1770 return container.autorelease(); |
1780 } | 1771 } |
1781 | 1772 |
1782 | |
1783 - (NSView*)buildSwitchUserView { | 1773 - (NSView*)buildSwitchUserView { |
1784 ProfileMetrics::LogProfileNewAvatarMenuNotYou( | 1774 ProfileMetrics::LogProfileNewAvatarMenuNotYou( |
1785 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_VIEW); | 1775 ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_VIEW); |
1786 base::scoped_nsobject<NSView> container( | 1776 base::scoped_nsobject<NSView> container( |
1787 [[NSView alloc] initWithFrame:NSZeroRect]); | 1777 [[NSView alloc] initWithFrame:NSZeroRect]); |
1788 CGFloat availableWidth = | 1778 CGFloat availableWidth = |
1789 kFixedSwitchUserViewWidth - 2 * kHorizontalSpacing; | 1779 kFixedSwitchUserViewWidth - 2 * kHorizontalSpacing; |
1790 CGFloat yOffset = 0; | 1780 CGFloat yOffset = 0; |
1791 NSRect viewRect = NSMakeRect(0, yOffset, | 1781 NSRect viewRect = NSMakeRect(0, yOffset, |
1792 kFixedSwitchUserViewWidth, | 1782 kFixedSwitchUserViewWidth, |
(...skipping 17 matching lines...) Expand all Loading... |
1810 [container addSubview:separator]; | 1800 [container addSubview:separator]; |
1811 yOffset = NSMaxY([separator frame]); | 1801 yOffset = NSMaxY([separator frame]); |
1812 | 1802 |
1813 // Adds "Add person" button. | 1803 // Adds "Add person" button. |
1814 viewRect.origin.y = yOffset; | 1804 viewRect.origin.y = yOffset; |
1815 NSButton* addPersonButton = | 1805 NSButton* addPersonButton = |
1816 [self hoverButtonWithRect:viewRect | 1806 [self hoverButtonWithRect:viewRect |
1817 text:l10n_util::GetNSString( | 1807 text:l10n_util::GetNSString( |
1818 IDS_PROFILES_ADD_PERSON_BUTTON) | 1808 IDS_PROFILES_ADD_PERSON_BUTTON) |
1819 imageResourceId:IDR_ICON_PROFILES_MENU_AVATAR | 1809 imageResourceId:IDR_ICON_PROFILES_MENU_AVATAR |
1820 action:@selector(addPerson:)]; | 1810 action:@selector(showUserManager:)]; |
1821 [container addSubview:addPersonButton]; | 1811 [container addSubview:addPersonButton]; |
1822 yOffset = NSMaxY([addPersonButton frame]); | 1812 yOffset = NSMaxY([addPersonButton frame]); |
1823 | 1813 |
1824 separator = [self horizontalSeparatorWithFrame: | 1814 separator = [self horizontalSeparatorWithFrame: |
1825 NSMakeRect(0, yOffset, kFixedMenuWidth, 0)]; | 1815 NSMakeRect(0, yOffset, kFixedMenuWidth, 0)]; |
1826 [container addSubview:separator]; | 1816 [container addSubview:separator]; |
1827 yOffset = NSMaxY([separator frame]); | 1817 yOffset = NSMaxY([separator frame]); |
1828 | 1818 |
1829 // Adds the content text. | 1819 // Adds the content text. |
1830 NSTextField* contentLabel = BuildLabel( | 1820 NSTextField* contentLabel = BuildLabel( |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1972 } | 1962 } |
1973 | 1963 |
1974 - (bool)shouldShowGoIncognito { | 1964 - (bool)shouldShowGoIncognito { |
1975 bool incognitoAvailable = | 1965 bool incognitoAvailable = |
1976 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 1966 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
1977 IncognitoModePrefs::DISABLED; | 1967 IncognitoModePrefs::DISABLED; |
1978 return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 1968 return incognitoAvailable && !browser_->profile()->IsGuestSession(); |
1979 } | 1969 } |
1980 | 1970 |
1981 @end | 1971 @end |
OLD | NEW |