A superficial take on both candidates’ positions is that they are both for legalization. But McCain had to backtrack considerably on that position during the primaries and now is far less pro-legalization than Obama.
Given that newly legalized citizens would overwhelmingly vote democrat, it should be plain where Obama would stand.