diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 17:13:41 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 17:13:41 +0000 |
commit | de004cba3d752c7e5ab3eb6b45536c0879e6764a (patch) | |
tree | b8792a4dee668e0cb8c96f9c7a1bada047198ff3 /chrome/browser/first_run_mac.mm | |
parent | 34ac70504d7090a9689c78fbcadd1a1224fc9cdd (diff) | |
download | chromium_src-de004cba3d752c7e5ab3eb6b45536c0879e6764a.zip chromium_src-de004cba3d752c7e5ab3eb6b45536c0879e6764a.tar.gz chromium_src-de004cba3d752c7e5ab3eb6b45536c0879e6764a.tar.bz2 |
OS X First run dialog: hide import option of nothing to import from.
* Modify the Mac First Run dialog so that if the system in question doesn't have any browser profiles to import from, we don't display the option.
* Modify SafariImporter to only be enabled if the current user's account actually has a profile attached to it.
Review URL: http://codereview.chromium.org/218039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run_mac.mm')
-rw-r--r-- | chrome/browser/first_run_mac.mm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/first_run_mac.mm b/chrome/browser/first_run_mac.mm index 32ea144..52e18a6 100644 --- a/chrome/browser/first_run_mac.mm +++ b/chrome/browser/first_run_mac.mm @@ -179,6 +179,9 @@ bool FirstRunController::DoFirstRun(Profile* profile, } [dialog.get() setBrowserImportList:browsers]; + BOOL browser_import_disabled = profiles_count == 0; + [dialog.get() setBrowserImportListHidden:browser_import_disabled]; + // FirstRunDialogController will call exit if "Cancel" is clicked. [dialog.get() showWindow:nil]; @@ -214,7 +217,7 @@ bool FirstRunController::DoFirstRun(Profile* profile, } // Import bookmarks. - if ([dialog.get() importBookmarks]) { + if (!browser_import_disabled && [dialog.get() importBookmarks]) { const ProfileInfo& source_profile = importer_host_->GetSourceProfileInfoAt( [dialog.get() browserImportSelectedIndex]); int16 items = source_profile.services_supported; |