diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 21:54:32 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 21:54:32 +0000 |
commit | f7011fcb7f28651953b1765b241c974e25c8cd40 (patch) | |
tree | f3a2c97bb98cc12aaca39bb27791998f026b58b7 /chrome/browser/app_controller_mac.mm | |
parent | 4663213354a9c41ab0e5a785d52bf5c9a9692514 (diff) | |
download | chromium_src-f7011fcb7f28651953b1765b241c974e25c8cd40.zip chromium_src-f7011fcb7f28651953b1765b241c974e25c8cd40.tar.gz chromium_src-f7011fcb7f28651953b1765b241c974e25c8cd40.tar.bz2 |
Porting profiles to the Mac.
Review URL: http://codereview.chromium.org/19623
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 2112218..3895ece 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -9,6 +9,7 @@ #import "chrome/browser/browser.h" #import "chrome/browser/browser_list.h" #import "chrome/browser/command_updater.h" +#import "chrome/browser/profile_manager.h" #import "chrome/common/temp_scaffolding_stubs.h" @interface AppController(PRIVATE) @@ -74,13 +75,16 @@ // command is supported and doesn't check, otherwise it would have been disabled // in the UI in validateUserInterfaceItem:. - (void)commandDispatch:(id)sender { + // How to get the profile created on line 314 of browser_main? Ugh. TODO:FIXME + Profile* default_profile = *g_browser_process->profile_manager()->begin(); + NSInteger tag = [sender tag]; switch (tag) { case IDC_NEW_WINDOW: - Browser::OpenEmptyWindow(ProfileManager::FakeProfile()); + Browser::OpenEmptyWindow(default_profile); break; case IDC_NEW_INCOGNITO_WINDOW: - Browser::OpenURLOffTheRecord(ProfileManager::FakeProfile(), GURL()); + Browser::OpenURLOffTheRecord(default_profile, GURL()); break; }; } |