The problem is very common in this models of notebooks (Toshiba satellite A300 and L300) freezes or restarts on AC power plug in.
It works on battery power and charges when power is connected on shutdown.
When its powered on with the AC plug connected may freeze when on, or remains on for a little while before freezing or restarts.
Another symptom created by the same problem is when the screen output distorted images or colored lines (vertical and horizontal) but this problem could be also associated with a bad GPU .
The problem is caused by NEC TOKIN 0E907 Proadlizer PF/A Capacitor for High Speed Decoupling Device, witch is responsible of coupling or decoupling the CPU hi speed/hi power(ac plugged in) or low speed/low power(ac unplugged). Here is a PDF file with the specs of the capacitor NEC TOKIN OE 907 specifications.
The Capacitor can be found on Ebay Here Buy Nec Tokin oe907 or on specialized sites.
I will add some pictures and videos and try to explain how to remove the bad capacitor from the board and apply another one.
If you have the right tools and knowledge you can proceed and have the Toshiba repaired by yourself .
This should be done with a IR Soldering station, but can be also done with a Hot air station or Hot air gun.
1. Remove all the removable components from the motherboard like Ram, Wireless card, CPU etc.
2. Cover the surrounding area near the capacitor with aluminium foil and apply some flux paste (soldering paste) all around the capacitor (see video #1) .
3. Using a Hot air gun you can start to heath the capacitor and use a tweezers to touch it from the side(see video #1). When it is moving that means that the soldering alloy reached the melting point.
4. Remove the bad cap with a Suction pen, and apply the new capacitor in the same position as the old one all this under the Hot air gun flow.
Keep flowing for aprox 60 seconds after you placed the new capacitor to allow the solder alloy to remelt.
5.Let the motherboard for 30 minutes to cool down, after that make sure the capacitor it is perfectly welded on the board.
6.Reassemble the laptop for testing.
How to remove NEC TOKIN CAPACITOR Video. Toshiba Repair Video.