| 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 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1923 - (NSView*)buildGaiaEmbeddedView { | 1923 - (NSView*)buildGaiaEmbeddedView { |
| 1924 base::scoped_nsobject<NSView> container( | 1924 base::scoped_nsobject<NSView> container( |
| 1925 [[NSView alloc] initWithFrame:NSZeroRect]); | 1925 [[NSView alloc] initWithFrame:NSZeroRect]); |
| 1926 CGFloat yOffset = 0; | 1926 CGFloat yOffset = 0; |
| 1927 | 1927 |
| 1928 GURL url; | 1928 GURL url; |
| 1929 int messageId = -1; | 1929 int messageId = -1; |
| 1930 SigninErrorController* errorController = NULL; | 1930 SigninErrorController* errorController = NULL; |
| 1931 switch (viewMode_) { | 1931 switch (viewMode_) { |
| 1932 case profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN: | 1932 case profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN: |
| 1933 url = signin::GetPromoURL(signin::SOURCE_AVATAR_BUBBLE_SIGN_IN, | 1933 url = signin::GetPromoURL(signin_metrics::SOURCE_AVATAR_BUBBLE_SIGN_IN, |
| 1934 false /* auto_close */, | 1934 false /* auto_close */, |
| 1935 true /* is_constrained */); | 1935 true /* is_constrained */); |
| 1936 messageId = IDS_PROFILES_GAIA_SIGNIN_TITLE; | 1936 messageId = IDS_PROFILES_GAIA_SIGNIN_TITLE; |
| 1937 break; | 1937 break; |
| 1938 case profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT: | 1938 case profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT: |
| 1939 url = signin::GetPromoURL(signin::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT, | 1939 url = signin::GetPromoURL( |
| 1940 false /* auto_close */, | 1940 signin_metrics::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT, |
| 1941 true /* is_constrained */); | 1941 false /* auto_close */, |
| 1942 true /* is_constrained */); |
| 1942 messageId = IDS_PROFILES_GAIA_ADD_ACCOUNT_TITLE; | 1943 messageId = IDS_PROFILES_GAIA_ADD_ACCOUNT_TITLE; |
| 1943 break; | 1944 break; |
| 1944 case profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH: | 1945 case profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH: |
| 1945 DCHECK(HasAuthError(browser_->profile())); | 1946 DCHECK(HasAuthError(browser_->profile())); |
| 1946 errorController = profiles::GetSigninErrorController(browser_->profile()); | 1947 errorController = profiles::GetSigninErrorController(browser_->profile()); |
| 1947 url = signin::GetReauthURL( | 1948 url = signin::GetReauthURL( |
| 1948 browser_->profile(), | 1949 browser_->profile(), |
| 1949 errorController ? errorController->error_username() : std::string()); | 1950 errorController ? errorController->error_username() : std::string()); |
| 1950 messageId = IDS_PROFILES_GAIA_REAUTH_TITLE; | 1951 messageId = IDS_PROFILES_GAIA_REAUTH_TITLE; |
| 1951 break; | 1952 break; |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2258 } | 2259 } |
| 2259 | 2260 |
| 2260 - (bool)shouldShowGoIncognito { | 2261 - (bool)shouldShowGoIncognito { |
| 2261 bool incognitoAvailable = | 2262 bool incognitoAvailable = |
| 2262 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2263 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
| 2263 IncognitoModePrefs::DISABLED; | 2264 IncognitoModePrefs::DISABLED; |
| 2264 return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 2265 return incognitoAvailable && !browser_->profile()->IsGuestSession(); |
| 2265 } | 2266 } |
| 2266 | 2267 |
| 2267 @end | 2268 @end |
| OLD | NEW |