Preheat the oven to 350°F. Line two 12-cup muffin tins with 18 cupcake papers. To make the cupcakes: In a small bowl, sift together the flour, baking powder, and salt. Set aside. In a large bowl, on the medium speed of an electric mixer, cream the butter until smooth. Add the sugars and beat until fluffy, about 3 minutes. Add the eggs, one at a time, beating well after each addition. Add the chocolate, mixing until well incorporated. Add the dry ingredients in three parts, alternating with the milk and vanilla. With each addition, beat until the ingredients are incorporated but do not overbeat. Using a rubber spatula, scrape down the batter in the bowl, making sure the ingredients are well blended, and the batter is smooth. Carefully spoon the batter into the cupcake liners, filling them about three-quarters full. Bake for 20 to 25 minutes, or until a cake tester inserted into the center of the cupcake comes out clean. Cool the cupcakes in the tins for 15 minutes. Remove from the tins and cool completely on a wire rack before frosting. To make the frosting: Melt the butter in a medium-size saucepan over medium-low heat. Add the brown sugar and whisk constantly for 5 minutes. Gradually add the cream, and continue whisking for 2 more minutes. Remove from the heat, transfer to a large bowl, and allow to cool to room temperature, 10 to 15 minutes, stirring occasionally. On the medium speed of an electric mixer, gradually add the confectioners' sugar, beating continuously until smooth. Add the vanilla and beat well. Continue to beat, on the medium speed, for an additional 5 minutes until very creamy, noticeably lighter in color, and of thicker consistency. Use immediately to frost the cupcakes or store, covered, at room temperature for up to 4 hours.