As a general rule, fruits or vegetables that are commonly eaten either raw or cooked require the same Beracha regardless of the form in which they are eaten. Yalkut Yosef gives the example of quinces, which people sometimes eat raw and sometimes first cook them. The Beracha would thus be "Ha’etz" regardless of whether it is eaten raw or cooked. Another example is the chestnut, which in some places, is eaten even raw. Hacham Ovadia Yosef thus rules that in such places, one recites "Ha’etz" over a chestnut regardless of how it is eaten. If, however, an item is commonly eaten only cooked, and not raw – like the chestnut in most places – then if it is eaten raw, its Beracha is "downgraded" to "She’ha’kol," since it is eaten in an unusual manner. Conversely, if a fruit is normally eaten raw, then the Beracha is "Ha’etz" only if it is eaten raw; if it is cooked, then its Beracha is "She’ha’kol." One example is citrus fruits, such as oranges. Since oranges are normally eaten raw, one who cooks an orange and eats it recites "She’ha’kol."
Yalkut Yosef makes an important exception to this rule, based on the Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909), in Parashat Pinhas (7). Namely, if a fruit or vegetable is normally eaten raw, but it can be enhanced by boiling it in water together with another item – such as sugar, or meat – then it maintains its original Beracha even after it is cooked. Since cooking in this manner has the effect of enhancing the food, the Beracha is not "downgraded" to "She’ha’kol," despite the fact that it is normally eaten raw. An example is nuts which are normally eaten raw, but can be boiled with a glaze of honey or sugar. The Beracha over such an item would be "Ha’etz," despite the fact that the nut is more commonly eaten raw.
Summary: If a fruit or vegetable is normally eaten raw, then one who eats it after it is cooked recites "She’ha’kol," instead of the normal Beracha of "Ha’etz" or Ha’adama." A common example is citrus fruits. Conversely, if a food is normally eaten cooked, then one who eats it raw recites "She’ha’kol," and "Ha’etz" or "Ha’adama" would be recited only if it is eaten cooked. An example would be a chestnut (except in places where it is eaten raw). A food which is eaten either cooked or raw – such as a quince – requires the same Beracha in either state. If a nut is normally eaten raw, but it can be enhanced by being cooked with sugar, honey or some other food, then it requires "Ha’etz" even after it is cooked.