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

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

Issue 1350653004: [sessions] Properly namespace recently-componentized TabRestore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac Created 5 years, 3 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
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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 } 870 }
871 871
872 // No profiles or active downloads found, okay to exit. 872 // No profiles or active downloads found, okay to exit.
873 return YES; 873 return YES;
874 } 874 }
875 875
876 // Called to determine if we should enable the "restore tab" menu item. 876 // Called to determine if we should enable the "restore tab" menu item.
877 // Checks with the TabRestoreService to see if there's anything there to 877 // Checks with the TabRestoreService to see if there's anything there to
878 // restore and returns YES if so. 878 // restore and returns YES if so.
879 - (BOOL)canRestoreTab { 879 - (BOOL)canRestoreTab {
880 TabRestoreService* service = 880 sessions::TabRestoreService* service =
881 TabRestoreServiceFactory::GetForProfile([self lastProfile]); 881 TabRestoreServiceFactory::GetForProfile([self lastProfile]);
882 return service && !service->entries().empty(); 882 return service && !service->entries().empty();
883 } 883 }
884 884
885 // Called from the AppControllerProfileObserver every time a profile is deleted. 885 // Called from the AppControllerProfileObserver every time a profile is deleted.
886 - (void)profileWasRemoved:(const base::FilePath&)profilePath { 886 - (void)profileWasRemoved:(const base::FilePath&)profilePath {
887 // If the lastProfile has been deleted, the profile manager has 887 // If the lastProfile has been deleted, the profile manager has
888 // already loaded a new one, so the pointer needs to be updated; 888 // already loaded a new one, so the pointer needs to be updated;
889 // otherwise we will try to start up a browser window with a pointer 889 // otherwise we will try to start up a browser window with a pointer
890 // to the old profile. 890 // to the old profile.
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 1710
1711 //--------------------------------------------------------------------------- 1711 //---------------------------------------------------------------------------
1712 1712
1713 namespace app_controller_mac { 1713 namespace app_controller_mac {
1714 1714
1715 bool IsOpeningNewWindow() { 1715 bool IsOpeningNewWindow() {
1716 return g_is_opening_new_window; 1716 return g_is_opening_new_window;
1717 } 1717 }
1718 1718
1719 } // namespace app_controller_mac 1719 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698