Commit 9ea5bb72 authored by Daniel Cheng's avatar Daniel Cheng Committed by Commit Bot

Chrome style plugin: enable virtual specifier checks for Gmock objects in //google_apis/gaia.

Previously, the plugin completely skipped virtual specifier checks on
Gmock objects since it wasn't smart enough to filter out warnings caused
by Gmock macros. In preparation for making the plugin smarter, this CL
fixes existing virtual specifier warnings in //google_apis/gaia.

This CL was uploaded by git cl split.

R=rogerta@chromium.org

Bug: 837148
Change-Id: Ia35de72ebe190980cbce1b3a8b0e96bd7f6fa246
Reviewed-on: https://chromium-review.googlesource.com/1031198Reviewed-by: default avatarRoger Tawa <rogerta@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554833}
parent 2e07490d
...@@ -171,7 +171,7 @@ class GaiaAuthFetcherTest : public testing::Test { ...@@ -171,7 +171,7 @@ class GaiaAuthFetcherTest : public testing::Test {
class MockGaiaConsumer : public GaiaAuthConsumer { class MockGaiaConsumer : public GaiaAuthConsumer {
public: public:
MockGaiaConsumer() {} MockGaiaConsumer() {}
~MockGaiaConsumer() {} ~MockGaiaConsumer() override {}
MOCK_METHOD1(OnClientLoginSuccess, void(const ClientLoginResult& result)); MOCK_METHOD1(OnClientLoginSuccess, void(const ClientLoginResult& result));
MOCK_METHOD2(OnIssueAuthTokenSuccess, void(const std::string& service, MOCK_METHOD2(OnIssueAuthTokenSuccess, void(const std::string& service,
......
...@@ -205,7 +205,7 @@ class GaiaOAuthClientTest : public testing::Test { ...@@ -205,7 +205,7 @@ class GaiaOAuthClientTest : public testing::Test {
class MockGaiaOAuthClientDelegate : public gaia::GaiaOAuthClient::Delegate { class MockGaiaOAuthClientDelegate : public gaia::GaiaOAuthClient::Delegate {
public: public:
MockGaiaOAuthClientDelegate() {} MockGaiaOAuthClientDelegate() {}
~MockGaiaOAuthClientDelegate() {} ~MockGaiaOAuthClientDelegate() override {}
MOCK_METHOD3(OnGetTokensResponse, void(const std::string& refresh_token, MOCK_METHOD3(OnGetTokensResponse, void(const std::string& refresh_token,
const std::string& access_token, const std::string& access_token,
......
...@@ -64,7 +64,7 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory, ...@@ -64,7 +64,7 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory,
public URLFetcherFactory { public URLFetcherFactory {
public: public:
MockUrlFetcherFactory() : ScopedURLFetcherFactory(this) {} MockUrlFetcherFactory() : ScopedURLFetcherFactory(this) {}
virtual ~MockUrlFetcherFactory() {} ~MockUrlFetcherFactory() override {}
MOCK_METHOD5( MOCK_METHOD5(
CreateURLFetcherMock, CreateURLFetcherMock,
...@@ -88,7 +88,7 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory, ...@@ -88,7 +88,7 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory,
class MockOAuth2AccessTokenConsumer : public OAuth2AccessTokenConsumer { class MockOAuth2AccessTokenConsumer : public OAuth2AccessTokenConsumer {
public: public:
MockOAuth2AccessTokenConsumer() {} MockOAuth2AccessTokenConsumer() {}
~MockOAuth2AccessTokenConsumer() {} ~MockOAuth2AccessTokenConsumer() override {}
MOCK_METHOD2(OnGetTokenSuccess, MOCK_METHOD2(OnGetTokenSuccess,
void(const std::string& access_token, void(const std::string& access_token,
......
...@@ -63,7 +63,7 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory, ...@@ -63,7 +63,7 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory,
MockUrlFetcherFactory() MockUrlFetcherFactory()
: ScopedURLFetcherFactory(this) { : ScopedURLFetcherFactory(this) {
} }
virtual ~MockUrlFetcherFactory() {} ~MockUrlFetcherFactory() override {}
MOCK_METHOD5(CreateURLFetcherMock, MOCK_METHOD5(CreateURLFetcherMock,
std::unique_ptr<URLFetcher>( std::unique_ptr<URLFetcher>(
...@@ -86,7 +86,7 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory, ...@@ -86,7 +86,7 @@ class MockUrlFetcherFactory : public ScopedURLFetcherFactory,
class MockApiCallFlow : public OAuth2ApiCallFlow { class MockApiCallFlow : public OAuth2ApiCallFlow {
public: public:
MockApiCallFlow() {} MockApiCallFlow() {}
~MockApiCallFlow() {} ~MockApiCallFlow() override {}
MOCK_METHOD0(CreateApiCallUrl, GURL()); MOCK_METHOD0(CreateApiCallUrl, GURL());
MOCK_METHOD0(CreateApiCallBody, std::string()); MOCK_METHOD0(CreateApiCallBody, std::string());
...@@ -96,7 +96,8 @@ class MockApiCallFlow : public OAuth2ApiCallFlow { ...@@ -96,7 +96,8 @@ class MockApiCallFlow : public OAuth2ApiCallFlow {
MOCK_METHOD1(ProcessMintAccessTokenFailure, MOCK_METHOD1(ProcessMintAccessTokenFailure,
void(const GoogleServiceAuthError& error)); void(const GoogleServiceAuthError& error));
net::PartialNetworkTrafficAnnotationTag GetNetworkTrafficAnnotationTag() { net::PartialNetworkTrafficAnnotationTag GetNetworkTrafficAnnotationTag()
override {
return PARTIAL_TRAFFIC_ANNOTATION_FOR_TESTS; return PARTIAL_TRAFFIC_ANNOTATION_FOR_TESTS;
} }
}; };
......
...@@ -128,7 +128,7 @@ static IssueAdviceInfo CreateIssueAdvice() { ...@@ -128,7 +128,7 @@ static IssueAdviceInfo CreateIssueAdvice() {
class MockDelegate : public OAuth2MintTokenFlow::Delegate { class MockDelegate : public OAuth2MintTokenFlow::Delegate {
public: public:
MockDelegate() {} MockDelegate() {}
~MockDelegate() {} ~MockDelegate() override {}
MOCK_METHOD2(OnMintTokenSuccess, void(const std::string& access_token, MOCK_METHOD2(OnMintTokenSuccess, void(const std::string& access_token,
int time_to_live)); int time_to_live));
...@@ -143,7 +143,7 @@ class MockMintTokenFlow : public OAuth2MintTokenFlow { ...@@ -143,7 +143,7 @@ class MockMintTokenFlow : public OAuth2MintTokenFlow {
explicit MockMintTokenFlow(MockDelegate* delegate, explicit MockMintTokenFlow(MockDelegate* delegate,
const OAuth2MintTokenFlow::Parameters& parameters) const OAuth2MintTokenFlow::Parameters& parameters)
: OAuth2MintTokenFlow(delegate, parameters) {} : OAuth2MintTokenFlow(delegate, parameters) {}
~MockMintTokenFlow() {} ~MockMintTokenFlow() override {}
MOCK_METHOD0(CreateAccessTokenFetcher, OAuth2AccessTokenFetcher*()); MOCK_METHOD0(CreateAccessTokenFetcher, OAuth2AccessTokenFetcher*());
}; };
...@@ -153,7 +153,7 @@ class MockMintTokenFlow : public OAuth2MintTokenFlow { ...@@ -153,7 +153,7 @@ class MockMintTokenFlow : public OAuth2MintTokenFlow {
class OAuth2MintTokenFlowTest : public testing::Test { class OAuth2MintTokenFlowTest : public testing::Test {
public: public:
OAuth2MintTokenFlowTest() {} OAuth2MintTokenFlowTest() {}
virtual ~OAuth2MintTokenFlowTest() { } ~OAuth2MintTokenFlowTest() override {}
protected: protected:
void CreateFlow(OAuth2MintTokenFlow::Mode mode) { void CreateFlow(OAuth2MintTokenFlow::Mode mode) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment