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

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

Issue 12088040: Add a SigninAllowed policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Some bugfixes. 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 = ![self keyWindowIsModal]; 781 enable = lastProfile->IsSigninAllowed() &&
782 ![self keyWindowIsModal];
782 [BrowserWindowController updateSigninItem:item 783 [BrowserWindowController updateSigninItem:item
783 shouldShow:enable 784 shouldShow:enable
784 currentProfile:lastProfile]; 785 currentProfile:lastProfile];
785 break; 786 break;
786 } 787 }
787 case IDC_FEEDBACK: 788 case IDC_FEEDBACK:
788 enable = NO; 789 enable = NO;
789 break; 790 break;
790 default: 791 default:
791 enable = menuState_->IsCommandEnabled(tag) ? 792 enable = menuState_->IsCommandEnabled(tag) ?
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 1348
1348 //--------------------------------------------------------------------------- 1349 //---------------------------------------------------------------------------
1349 1350
1350 namespace app_controller_mac { 1351 namespace app_controller_mac {
1351 1352
1352 bool IsOpeningNewWindow() { 1353 bool IsOpeningNewWindow() {
1353 return g_is_opening_new_window; 1354 return g_is_opening_new_window;
1354 } 1355 }
1355 1356
1356 } // namespace app_controller_mac 1357 } // namespace app_controller_mac
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698