The nonlinear optical response of metallic-nanoparticle-containing composites was studied with picosecond and femtosecond pulses. Two different types of nanocomposites were prepared by an ion-implantation process, one containing Au nanoparticles (NPs) and the other Ag NPs. In order to measure the optical nonlinearities, we used a picosecond self-diffraction experiment and the femtosecond time-resolved optical Kerr gate technique. In both cases, electronic polarization and saturated absorption were identified as the physical mechanisms responsible for the picosecond third-order nonlinear response for a near-resonant 532 nm excitation. In contrast, a purely electronic nonlinearity was detected at 830 nm with non-resonant 80 fs pulses. Regarding the nonlinear optical refractive behavior, the Au nanocomposite presented a self-defocusing effect, while the Ag one presented the opposite, that is, a self-focusing response. But, when evaluating the simultaneous contributions when the samples are tested as a multilayer sample (silica-Au NPs-silica-Ag NPs-silica), we were able to obtain optical phase modulation of ultra-short laser pulses, as a result of a significant optical Kerr effect present in these nanocomposites. This allowed us to implement an ultrafast all-optical phase modulator device by using a combination of two different metallic ion-implanted silica samples. This control of the optical phase is a consequence of the separate excitation of the nonlinear refracting phenomena exhibited by the separate Au and Ag nanocomposites.