Former Maryland governor Martin O'Malley speaks on "Face the Nation" in 2011. (Photo by Chris Usher/CBS News via Getty Images)

Former Maryland governor Martin O’Malley, who is gearing up for his own 2016 presidential bid, appears increasingly comfortable taking shots at Hillary Rodham Clinton.

On Thursday, O’Malley knocked the Democratic front-runner for two positions she’s taken in recent days that he has held for some time regarding same-sex marriage and immigration -- suggesting she’s been motivated by polling.

On Wednesday, the former secretary of state said that she would support a constitutional amendment allowing same-sex marriage, a shift from her view a year ago that the issue should be left to the states. On Thursday, she voiced support for allowing undocumented immigrants to have driver's licenses, an issue that hurt her during the 2008 election after she seemed intentionally vague.

"I’m glad Secretary Clinton’s come around to the right positions on these issues," O'Malley told reporters Thursday night before delivering a speech at Harvard University. "I believe that we are best as a party when we lead with our principles and not according to the polls. .. Leadership is about making the right decision and the best decision before sometimes it becomes entirely popular.”

Until recently, O’Malley has seemed loathe to directly criticize Clinton, whom he lags far behind in the polls. Last month, he declared that he was “a little sick of the e-mail drama” after reporters baited him with questions about Clinton’s use of a personal account while secretary of state.

In speeches around the country, O’Malley has sought to highlight some policy differences, though he typically hasn’t mentioned Clinton by name and his efforts have been lost on many in the audience. On same-sex marriage, for example, O’Malley has stressed that he considers it a “human right” and not a state right.

On Wednesday afternoon, after Clinton’s new position became the topic of news stories, O'Malley's political team released a short video highlighting his stance that included a clip from a recent speech in which he said "history celebrates profiles in courage, not profiles in convenience."

O’Malley, who supported civil unions earlier in his political career, led Maryland’s efforts to legalize same-sex marriage in 2012. During O’Malley’s tenure, the state also adopted a two-tiered system that allows undocumented immigrants to get limited driver’s licenses that can’t be used for other purposes, such as boarding an airplane.

“I believe that we do our country a disservice when we make it harder for new American immigrants to abide by the rules of the road and obtain drivers licenses,” O’Malley said Thursday. “And I’m glad she’s come around to that position now too.”