Preheat oven to 350 degrees. (Don’t forget to defrost the potatoes!) In a big bowl, combine hash browns with onion. Melt 2/3rds stick of unsalted butter and add to hash brown mixture Add the grated cheese. In a separate bowl, combine chicken soup and sour cream. Add mixture, chopped ham and bacon pieces to hash browns and stir in all together. Pour into 9x13 baking pan. Bake at 350 degrees for 40 minutes. Crush the corn flakes in a bowl and combine with 2 TBSP melted butter. After mixture has baked for 40 minutes, sprinkle corn flakes on top. Put dish back in oven and bake another 20 minutes (for a total of 1 hour).