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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 12077030: Allow signin to continue even if sync is disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows sync integration test failure Created 7 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 // http://code.google.com/p/chromium/issues/detail?id=43048 . 771 // http://code.google.com/p/chromium/issues/detail?id=43048 .
772 // 772 //
773 // TODO(akalin,viettrungluu): Figure out whether this method 773 // TODO(akalin,viettrungluu): Figure out whether this method
774 // can be prevented from being called if lastProfile is 774 // can be prevented from being called if lastProfile is
775 // NULL. 775 // NULL.
776 if (!lastProfile) { 776 if (!lastProfile) {
777 LOG(WARNING) 777 LOG(WARNING)
778 << "NULL lastProfile detected -- not doing anything"; 778 << "NULL lastProfile detected -- not doing anything";
779 break; 779 break;
780 } 780 }
781 enable = lastProfile->IsSyncAccessible() && 781 enable = ![self keyWindowIsModal];
782 ![self keyWindowIsModal];
783 [BrowserWindowController updateSigninItem:item 782 [BrowserWindowController updateSigninItem:item
784 shouldShow:enable 783 shouldShow:enable
785 currentProfile:lastProfile]; 784 currentProfile:lastProfile];
786 break; 785 break;
787 } 786 }
788 case IDC_FEEDBACK: 787 case IDC_FEEDBACK:
789 enable = NO; 788 enable = NO;
790 break; 789 break;
791 default: 790 default:
792 enable = menuState_->IsCommandEnabled(tag) ? 791 enable = menuState_->IsCommandEnabled(tag) ?
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 chrome::OpenExtensionsWindow(lastProfile); 910 chrome::OpenExtensionsWindow(lastProfile);
912 break; 911 break;
913 case IDC_HELP_PAGE_VIA_MENU: 912 case IDC_HELP_PAGE_VIA_MENU:
914 if (Browser* browser = ActivateBrowser(lastProfile)) 913 if (Browser* browser = ActivateBrowser(lastProfile))
915 chrome::ShowHelp(browser, chrome::HELP_SOURCE_MENU); 914 chrome::ShowHelp(browser, chrome::HELP_SOURCE_MENU);
916 else 915 else
917 chrome::OpenHelpWindow(lastProfile, chrome::HELP_SOURCE_MENU); 916 chrome::OpenHelpWindow(lastProfile, chrome::HELP_SOURCE_MENU);
918 break; 917 break;
919 case IDC_SHOW_SYNC_SETUP: 918 case IDC_SHOW_SYNC_SETUP:
920 if (Browser* browser = ActivateBrowser(lastProfile)) 919 if (Browser* browser = ActivateBrowser(lastProfile))
921 chrome::ShowSyncSetup(browser, SyncPromoUI::SOURCE_MENU); 920 chrome::ShowBrowserSignin(browser, SyncPromoUI::SOURCE_MENU);
922 else 921 else
923 chrome::OpenSyncSetupWindow(lastProfile, SyncPromoUI::SOURCE_MENU); 922 chrome::OpenSyncSetupWindow(lastProfile, SyncPromoUI::SOURCE_MENU);
924 break; 923 break;
925 case IDC_TASK_MANAGER: 924 case IDC_TASK_MANAGER:
926 content::RecordAction(UserMetricsAction("TaskManager")); 925 content::RecordAction(UserMetricsAction("TaskManager"));
927 TaskManagerMac::Show(false); 926 TaskManagerMac::Show(false);
928 break; 927 break;
929 case IDC_OPTIONS: 928 case IDC_OPTIONS:
930 [self showPreferences:sender]; 929 [self showPreferences:sender];
931 break; 930 break;
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 1347
1349 //--------------------------------------------------------------------------- 1348 //---------------------------------------------------------------------------
1350 1349
1351 namespace app_controller_mac { 1350 namespace app_controller_mac {
1352 1351
1353 bool IsOpeningNewWindow() { 1352 bool IsOpeningNewWindow() {
1354 return g_is_opening_new_window; 1353 return g_is_opening_new_window;
1355 } 1354 }
1356 1355
1357 } // namespace app_controller_mac 1356 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/autofill/autofill_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698