What kind of injury did you have?
If you have a loss of cartilage, I would recommend that you use a good glucosamine supplement to help maintain the remaining cartilage.
As for how squats would affect you condition, it would really depend on how much cartilage is gone and if there is significant bone/bone forces due to loss of joint space.
Obviously squats will create a compressive load on the hip joints, which could potentially irritate the hip. However, the increased loading is performed for relatively short duration. I would think that long distance running would be more problematic.
Are you performing squats currently? If so, how does the hip feel the next couple of days?