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

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

Issue 176363002: Rename Start/EndKeepAlive to Increment/DecrementKeepAliveCount (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (rename_keep_alive) Created 6 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
« no previous file with comments | « apps/shell/browser/shell_apps_client.cc ('k') | chrome/browser/apps/chrome_apps_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "apps/app_shim/app_shim_mac.h" 7 #include "apps/app_shim/app_shim_mac.h"
8 #include "apps/app_shim/extension_app_shim_handler_mac.h" 8 #include "apps/app_shim/extension_app_shim_handler_mac.h"
9 #include "apps/app_window_registry.h" 9 #include "apps/app_window_registry.h"
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 runModalLoopForApplication:app]; 440 runModalLoopForApplication:app];
441 } 441 }
442 442
443 // Called when the app is shutting down. Clean-up as appropriate. 443 // Called when the app is shutting down. Clean-up as appropriate.
444 - (void)applicationWillTerminate:(NSNotification*)aNotification { 444 - (void)applicationWillTerminate:(NSNotification*)aNotification {
445 // There better be no browser windows left at this point. 445 // There better be no browser windows left at this point.
446 CHECK_EQ(0u, chrome::GetTotalBrowserCount()); 446 CHECK_EQ(0u, chrome::GetTotalBrowserCount());
447 447
448 // Tell BrowserList not to keep the browser process alive. Once all the 448 // Tell BrowserList not to keep the browser process alive. Once all the
449 // browsers get dealloc'd, it will stop the RunLoop and fall back into main(). 449 // browsers get dealloc'd, it will stop the RunLoop and fall back into main().
450 chrome::EndKeepAlive(); 450 chrome::DecrementKeepAliveCount();
451 451
452 // Reset all pref watching, as this object outlives the prefs system. 452 // Reset all pref watching, as this object outlives the prefs system.
453 profilePrefRegistrar_.reset(); 453 profilePrefRegistrar_.reset();
454 localPrefRegistrar_.RemoveAll(); 454 localPrefRegistrar_.RemoveAll();
455 455
456 [self unregisterEventHandlers]; 456 [self unregisterEventHandlers];
457 457
458 appShimMenuController_.reset(); 458 appShimMenuController_.reset();
459 } 459 }
460 460
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 CFPreferencesAppSynchronize(app); 687 CFPreferencesAppSynchronize(app);
688 } 688 }
689 #endif 689 #endif
690 } 690 }
691 691
692 // This is called after profiles have been loaded and preferences registered. 692 // This is called after profiles have been loaded and preferences registered.
693 // It is safe to access the default profile here. 693 // It is safe to access the default profile here.
694 - (void)applicationDidFinishLaunching:(NSNotification*)notify { 694 - (void)applicationDidFinishLaunching:(NSNotification*)notify {
695 // Notify BrowserList to keep the application running so it doesn't go away 695 // Notify BrowserList to keep the application running so it doesn't go away
696 // when all the browser windows get closed. 696 // when all the browser windows get closed.
697 chrome::StartKeepAlive(); 697 chrome::IncrementKeepAliveCount();
698 698
699 [self setUpdateCheckInterval]; 699 [self setUpdateCheckInterval];
700 700
701 // Start managing the menu for app windows. This needs to be done here because 701 // Start managing the menu for app windows. This needs to be done here because
702 // main menu item titles are not yet initialized in awakeFromNib. 702 // main menu item titles are not yet initialized in awakeFromNib.
703 [self initAppShimMenuController]; 703 [self initAppShimMenuController];
704 704
705 // Build up the encoding menu, the order of the items differs based on the 705 // Build up the encoding menu, the order of the items differs based on the
706 // current locale (see http://crbug.com/7647 for details). 706 // current locale (see http://crbug.com/7647 for details).
707 // We need a valid g_browser_process to get the profile which is why we can't 707 // We need a valid g_browser_process to get the profile which is why we can't
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 1516
1517 //--------------------------------------------------------------------------- 1517 //---------------------------------------------------------------------------
1518 1518
1519 namespace app_controller_mac { 1519 namespace app_controller_mac {
1520 1520
1521 bool IsOpeningNewWindow() { 1521 bool IsOpeningNewWindow() {
1522 return g_is_opening_new_window; 1522 return g_is_opening_new_window;
1523 } 1523 }
1524 1524
1525 } // namespace app_controller_mac 1525 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « apps/shell/browser/shell_apps_client.cc ('k') | chrome/browser/apps/chrome_apps_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698