This is a hypothetical with a fact pattern that has not been answered by any previous questions.
Generally, a non-Jew adoptee in a Jewish family will be Jewish by halachic upbringing.
If a child of a non-Jewish mother is adopted by a mother who is, by blood line, Jewish; however, she failed to follow the Torah and live by halachic rules because of her parents having converted out in fear of and as a result of actual past persecution, the mother would be considered Jewish regardless. But would a child adopted by her immediately after birth be also considered Jewish in recognition of the maternity of an adopting mother or not?
To further complicate the question: Does it make a difference that the adopting mother is the actual paternal grandmother of the orphan?
In other words: Is the above generic statement based on a theory of recognition of the mother’s autonomy or merely reflecting that one may convert and a child may be converted on his behalf?