| 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 <stddef.h> | 7 #include <stddef.h> | 
| 8 | 8 | 
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" | 
| 10 #include "base/bind.h" | 10 #include "base/bind.h" | 
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 524   keep_alive_.reset(); | 524   keep_alive_.reset(); | 
| 525 | 525 | 
| 526   // Reset all pref watching, as this object outlives the prefs system. | 526   // Reset all pref watching, as this object outlives the prefs system. | 
| 527   profilePrefRegistrar_.reset(); | 527   profilePrefRegistrar_.reset(); | 
| 528   localPrefRegistrar_.RemoveAll(); | 528   localPrefRegistrar_.RemoveAll(); | 
| 529 | 529 | 
| 530   [self unregisterEventHandlers]; | 530   [self unregisterEventHandlers]; | 
| 531 | 531 | 
| 532   appShimMenuController_.reset(); | 532   appShimMenuController_.reset(); | 
| 533 | 533 | 
| 534   STLDeleteContainerPairSecondPointers(profileBookmarkMenuBridgeMap_.begin(), | 534   base::STLDeleteContainerPairSecondPointers( | 
| 535                                        profileBookmarkMenuBridgeMap_.end()); | 535       profileBookmarkMenuBridgeMap_.begin(), | 
|  | 536       profileBookmarkMenuBridgeMap_.end()); | 
| 536 } | 537 } | 
| 537 | 538 | 
| 538 - (void)didEndMainMessageLoop { | 539 - (void)didEndMainMessageLoop { | 
| 539   DCHECK_EQ(0u, chrome::GetBrowserCount([self lastProfile])); | 540   DCHECK_EQ(0u, chrome::GetBrowserCount([self lastProfile])); | 
| 540   if (!chrome::GetBrowserCount([self lastProfile])) { | 541   if (!chrome::GetBrowserCount([self lastProfile])) { | 
| 541     // As we're shutting down, we need to nuke the TabRestoreService, which | 542     // As we're shutting down, we need to nuke the TabRestoreService, which | 
| 542     // will start the shutdown of the NavigationControllers and allow for | 543     // will start the shutdown of the NavigationControllers and allow for | 
| 543     // proper shutdown. If we don't do this, Chrome won't shut down cleanly, | 544     // proper shutdown. If we don't do this, Chrome won't shut down cleanly, | 
| 544     // and may end up crashing when some thread tries to use the IO thread (or | 545     // and may end up crashing when some thread tries to use the IO thread (or | 
| 545     // another thread) that is no longer valid. | 546     // another thread) that is no longer valid. | 
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1689 | 1690 | 
| 1690 //--------------------------------------------------------------------------- | 1691 //--------------------------------------------------------------------------- | 
| 1691 | 1692 | 
| 1692 namespace app_controller_mac { | 1693 namespace app_controller_mac { | 
| 1693 | 1694 | 
| 1694 bool IsOpeningNewWindow() { | 1695 bool IsOpeningNewWindow() { | 
| 1695   return g_is_opening_new_window; | 1696   return g_is_opening_new_window; | 
| 1696 } | 1697 } | 
| 1697 | 1698 | 
| 1698 }  // namespace app_controller_mac | 1699 }  // namespace app_controller_mac | 
| OLD | NEW | 
|---|