  Gluon shadowing which is the main source of nuclear effects for production of
heavy flavored hadrons, remains unknown. We develop a light-cone dipole
approach aiming at simplifying the calculations of nuclear shadowing for heavy
flavor production, as well as the cross section which does not need
next-to-leading and higher order corrections. A substantial process dependence
of gluon shadowing is found at the scale of charm mass manifesting a deviation
from QCD factorization. The magnitude of the shadowing effect correlates with
the symmetry properties and color state of the produced c-cbar pair. It is
about twice as large as in DIS, but smaller than for charmonium production. The
higher twist shadowing correction related to a nonzero size of the c-cbar pair
is not negligible and steeply rises with energy. We predict an appreciable
suppression by shadowing for charm production in heavy ion collisions at RHIC
and a stronger effect at LHC. At the same time, we expect no visible difference
between nuclear effects for minimal bias and central collisions, as is
suggested by recent data from the PHENIX experiment at RHIC. We also
demonstrate that at medium high energies when no shadowing is possible, final
state interaction may cause a rather strong absorption of heavy flavored
hadrons produced at large x_F.
