I really recommend reading this article from Uxplanet: Rounded or Sharp-Corner Buttons?
You can take these points home:
-Squared Sharp designs are usually viewed as firm/serious/uniformed
-Rounded designs are viewed as friendly and harmless.
You cannot really identify a pattern from the examples you provided above. Facebook uses sharp corners for Login, and rounded ones for registration. Are they being friendly on the sign-up page to encourage you to register an account? Are you already registered and when it comes to Login it is more of a firm uniformed task, so it is sharp squared design?
Google used to have boxy sharp corners for their Search Engine, but now they use rounded ones. Why? Are they unifying their designs to be rounded for consistency purposes, or is it just a look purpose that was chosen by their designers?
I have not seen any research that would enforce using rounded corners for some parts of the application while using sharp ones for the rest. All I can think of is that Rounded ones look friendlier and Sharp ones look firmer and more uniformed, so maybe using each at different locations make sense, but how about consistency and unity?
How do we see old boxy cars designs compared to the curved rounded designs nowadays? Has Google moved from more boxy design to a curvey one? Better look, friendlier?