CRUST: In a food processor, add flour, sugar and salt and pulse to combine. Add butter, cut into 1 inch pieces, and pulse until it looks like coarse meal with no large chunks remaining. Add vinegar and water and pulse until the dough starts to come together. Place on floured surface and knead until all flour is incorporated, it won’t be smooth. Divide in half and pat into two flat disks about 1 inch thick. Wrap in plastic wrap and refrigerate for at least 2 hours.
Preheat oven to 425º.
Filing: Heat butter in large skillet and add onions. Sprinkle with salt and pepper and cook until translucent, about 4-5 minutes. Add garlic and cook for 1 minute. Add finely chopped potatoes and stir cooking for 10 minutes or until tender but not mashed, stirring frequently. Add dried thyme. Sprinkle the flour over the mixture and stir, cook for 2-3 minutes.
Warm chicken stock in the microwave and then slowly add to the potato mixture stirring constantly. Once combined, add corn and chicken. Stir in cream and salt and pepper. Let cool slightly.
Roll out cold crust onto a piece of parchment paper until it is 1/4 inch thick. If it is too soft to work with, place it back in the refrigerator for a few minutes. Spoon the chicken mixture into the center leaving about 2 inches around the edges. Fold edges over. Brush the crust with cream and sprinkle the crust with coarse sea salt.
Bake for 30 minutes or until the filling is bubbly and the crust is golden. Let sit for 5 minutes before serving.