OLD | NEW |
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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 // http://code.google.com/p/chromium/issues/detail?id=43048 . | 775 // http://code.google.com/p/chromium/issues/detail?id=43048 . |
776 // | 776 // |
777 // TODO(akalin,viettrungluu): Figure out whether this method | 777 // TODO(akalin,viettrungluu): Figure out whether this method |
778 // can be prevented from being called if lastProfile is | 778 // can be prevented from being called if lastProfile is |
779 // NULL. | 779 // NULL. |
780 if (!lastProfile) { | 780 if (!lastProfile) { |
781 LOG(WARNING) | 781 LOG(WARNING) |
782 << "NULL lastProfile detected -- not doing anything"; | 782 << "NULL lastProfile detected -- not doing anything"; |
783 break; | 783 break; |
784 } | 784 } |
785 enable = ![self keyWindowIsModal]; | 785 enable = lastProfile->IsSigninAllowed() && |
| 786 ![self keyWindowIsModal]; |
786 [BrowserWindowController updateSigninItem:item | 787 [BrowserWindowController updateSigninItem:item |
787 shouldShow:enable | 788 shouldShow:enable |
788 currentProfile:lastProfile]; | 789 currentProfile:lastProfile]; |
789 break; | 790 break; |
790 } | 791 } |
791 case IDC_FEEDBACK: | 792 case IDC_FEEDBACK: |
792 enable = NO; | 793 enable = NO; |
793 break; | 794 break; |
794 default: | 795 default: |
795 enable = menuState_->IsCommandEnabled(tag) ? | 796 enable = menuState_->IsCommandEnabled(tag) ? |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1351 | 1352 |
1352 //--------------------------------------------------------------------------- | 1353 //--------------------------------------------------------------------------- |
1353 | 1354 |
1354 namespace app_controller_mac { | 1355 namespace app_controller_mac { |
1355 | 1356 |
1356 bool IsOpeningNewWindow() { | 1357 bool IsOpeningNewWindow() { |
1357 return g_is_opening_new_window; | 1358 return g_is_opening_new_window; |
1358 } | 1359 } |
1359 | 1360 |
1360 } // namespace app_controller_mac | 1361 } // namespace app_controller_mac |
OLD | NEW |