summaryrefslogtreecommitdiffstats
path: root/components/proximity_auth
diff options
context:
space:
mode:
Diffstat (limited to 'components/proximity_auth')
-rw-r--r--components/proximity_auth/bluetooth_connection.h12
-rw-r--r--components/proximity_auth/bluetooth_connection_finder.h19
-rw-r--r--components/proximity_auth/bluetooth_connection_unittest.cc4
-rw-r--r--components/proximity_auth/client.h17
-rw-r--r--components/proximity_auth/client_unittest.cc12
-rw-r--r--components/proximity_auth/connection_unittest.cc2
-rw-r--r--components/proximity_auth/cryptauth/cryptauth_api_call_flow.h12
-rw-r--r--components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc6
8 files changed, 41 insertions, 43 deletions
diff --git a/components/proximity_auth/bluetooth_connection.h b/components/proximity_auth/bluetooth_connection.h
index ebe4f8d..affa5b2 100644
--- a/components/proximity_auth/bluetooth_connection.h
+++ b/components/proximity_auth/bluetooth_connection.h
@@ -33,17 +33,17 @@ class BluetoothConnection : public Connection,
// Bluetooth daemon.
BluetoothConnection(const RemoteDevice& remote_device,
const device::BluetoothUUID& uuid);
- virtual ~BluetoothConnection();
+ ~BluetoothConnection() override;
protected:
// Connection:
- virtual void Connect() override;
- virtual void Disconnect() override;
- virtual void SendMessageImpl(scoped_ptr<WireMessage> message) override;
+ void Connect() override;
+ void Disconnect() override;
+ void SendMessageImpl(scoped_ptr<WireMessage> message) override;
// BluetoothAdapter::Observer:
- virtual void DeviceRemoved(device::BluetoothAdapter* adapter,
- device::BluetoothDevice* device) override;
+ void DeviceRemoved(device::BluetoothAdapter* adapter,
+ device::BluetoothDevice* device) override;
private:
// Registers receive callbacks with the backing |socket_|.
diff --git a/components/proximity_auth/bluetooth_connection_finder.h b/components/proximity_auth/bluetooth_connection_finder.h
index 8de83b7..40b28dd 100644
--- a/components/proximity_auth/bluetooth_connection_finder.h
+++ b/components/proximity_auth/bluetooth_connection_finder.h
@@ -30,20 +30,20 @@ class BluetoothConnectionFinder : public ConnectionFinder,
BluetoothConnectionFinder(const RemoteDevice& remote_device,
const device::BluetoothUUID& uuid,
const base::TimeDelta& polling_interval);
- virtual ~BluetoothConnectionFinder();
+ ~BluetoothConnectionFinder() override;
// ConnectionFinder:
- virtual void Find(const ConnectionCallback& connection_callback) override;
+ void Find(const ConnectionCallback& connection_callback) override;
protected:
// Exposed for mocking out the connection in tests.
virtual scoped_ptr<Connection> CreateConnection();
// BluetoothAdapter::Observer:
- virtual void AdapterPresentChanged(device::BluetoothAdapter* adapter,
- bool present) override;
- virtual void AdapterPoweredChanged(device::BluetoothAdapter* adapter,
- bool powered) override;
+ void AdapterPresentChanged(device::BluetoothAdapter* adapter,
+ bool present) override;
+ void AdapterPoweredChanged(device::BluetoothAdapter* adapter,
+ bool powered) override;
private:
// Returns true iff the Bluetooth adapter is ready to make connections.
@@ -64,10 +64,9 @@ class BluetoothConnectionFinder : public ConnectionFinder,
void OnAdapterInitialized(scoped_refptr<device::BluetoothAdapter> adapter);
// ConnectionObserver:
- virtual void OnConnectionStatusChanged(
- const Connection& connection,
- Connection::Status old_status,
- Connection::Status new_status) override;
+ void OnConnectionStatusChanged(const Connection& connection,
+ Connection::Status old_status,
+ Connection::Status new_status) override;
// The remote device to connect to.
const RemoteDevice remote_device_;
diff --git a/components/proximity_auth/bluetooth_connection_unittest.cc b/components/proximity_auth/bluetooth_connection_unittest.cc
index 1476533..a30d08c 100644
--- a/components/proximity_auth/bluetooth_connection_unittest.cc
+++ b/components/proximity_auth/bluetooth_connection_unittest.cc
@@ -80,9 +80,9 @@ class MockBluetoothConnection : public BluetoothConnection {
class TestWireMessage : public WireMessage {
public:
TestWireMessage() : WireMessage("permit id", "payload") {}
- virtual ~TestWireMessage() {}
+ ~TestWireMessage() override {}
- virtual std::string Serialize() const override { return kSerializedMessage; }
+ std::string Serialize() const override { return kSerializedMessage; }
private:
DISALLOW_COPY_AND_ASSIGN(TestWireMessage);
diff --git a/components/proximity_auth/client.h b/components/proximity_auth/client.h
index cea47ee..5cd5107 100644
--- a/components/proximity_auth/client.h
+++ b/components/proximity_auth/client.h
@@ -91,15 +91,14 @@ class Client : public ConnectionObserver {
void HandleUnlockResponseMessage(const base::DictionaryValue& message);
// ConnectionObserver:
- virtual void OnConnectionStatusChanged(
- const Connection& connection,
- Connection::Status old_status,
- Connection::Status new_status) override;
- virtual void OnMessageReceived(const Connection& connection,
- const WireMessage& wire_message) override;
- virtual void OnSendCompleted(const Connection& connection,
- const WireMessage& wire_message,
- bool success) override;
+ void OnConnectionStatusChanged(const Connection& connection,
+ Connection::Status old_status,
+ Connection::Status new_status) override;
+ void OnMessageReceived(const Connection& connection,
+ const WireMessage& wire_message) override;
+ void OnSendCompleted(const Connection& connection,
+ const WireMessage& wire_message,
+ bool success) override;
// The connection used to send and receive events and status updates.
scoped_ptr<Connection> connection_;
diff --git a/components/proximity_auth/client_unittest.cc b/components/proximity_auth/client_unittest.cc
index f2e5d60..49c0b1a 100644
--- a/components/proximity_auth/client_unittest.cc
+++ b/components/proximity_auth/client_unittest.cc
@@ -62,13 +62,13 @@ class MockSecureContext : public SecureContext {
class FakeConnection : public Connection {
public:
FakeConnection() : Connection(RemoteDevice()) { Connect(); }
- virtual ~FakeConnection() { Disconnect(); }
+ ~FakeConnection() override { Disconnect(); }
- virtual void Connect() override { SetStatus(CONNECTED); }
+ void Connect() override { SetStatus(CONNECTED); }
- virtual void Disconnect() override { SetStatus(DISCONNECTED); }
+ void Disconnect() override { SetStatus(DISCONNECTED); }
- virtual void SendMessageImpl(scoped_ptr<WireMessage> message) override {
+ void SendMessageImpl(scoped_ptr<WireMessage> message) override {
ASSERT_FALSE(current_message_);
current_message_ = message.Pass();
}
@@ -91,7 +91,7 @@ class FakeConnection : public Connection {
// Returns a message containing the payload set via
// ReceiveMessageWithPayload().
- virtual scoped_ptr<WireMessage> DeserializeWireMessage(
+ scoped_ptr<WireMessage> DeserializeWireMessage(
bool* is_incomplete_message) override {
*is_incomplete_message = false;
return make_scoped_ptr(new WireMessage(std::string(), pending_payload_));
@@ -142,7 +142,7 @@ class TestClient : public Client {
TestClient()
: Client(make_scoped_ptr(new NiceMock<FakeConnection>()),
make_scoped_ptr(new NiceMock<MockSecureContext>())) {}
- virtual ~TestClient() {}
+ ~TestClient() override {}
// Simple getters for the mock objects owned by |this| client.
FakeConnection* GetFakeConnection() {
diff --git a/components/proximity_auth/connection_unittest.cc b/components/proximity_auth/connection_unittest.cc
index e3c335f..8fb1593 100644
--- a/components/proximity_auth/connection_unittest.cc
+++ b/components/proximity_auth/connection_unittest.cc
@@ -77,7 +77,7 @@ class MockConnectionObserver : public ConnectionObserver {
class TestWireMessage : public WireMessage {
public:
TestWireMessage() : WireMessage(std::string(), std::string()) {}
- virtual ~TestWireMessage() {}
+ ~TestWireMessage() override {}
private:
DISALLOW_COPY_AND_ASSIGN(TestWireMessage);
diff --git a/components/proximity_auth/cryptauth/cryptauth_api_call_flow.h b/components/proximity_auth/cryptauth/cryptauth_api_call_flow.h
index 53ae29b..3dd8f8c 100644
--- a/components/proximity_auth/cryptauth/cryptauth_api_call_flow.h
+++ b/components/proximity_auth/cryptauth/cryptauth_api_call_flow.h
@@ -23,7 +23,7 @@ class CryptAuthApiCallFlow : public OAuth2ApiCallFlow {
typedef base::Callback<void(const std::string& error_message)> ErrorCallback;
CryptAuthApiCallFlow(const GURL& request_url);
- virtual ~CryptAuthApiCallFlow();
+ ~CryptAuthApiCallFlow() override;
// Starts the API call.
// context: The URL context used to make the request.
@@ -44,11 +44,11 @@ class CryptAuthApiCallFlow : public OAuth2ApiCallFlow {
using OAuth2ApiCallFlow::Start;
// google_apis::OAuth2ApiCallFlow:
- virtual GURL CreateApiCallUrl() override;
- virtual std::string CreateApiCallBody() override;
- virtual std::string CreateApiCallBodyContentType() override;
- virtual void ProcessApiCallSuccess(const net::URLFetcher* source) override;
- virtual void ProcessApiCallFailure(const net::URLFetcher* source) override;
+ GURL CreateApiCallUrl() override;
+ std::string CreateApiCallBody() override;
+ std::string CreateApiCallBodyContentType() override;
+ void ProcessApiCallSuccess(const net::URLFetcher* source) override;
+ void ProcessApiCallFailure(const net::URLFetcher* source) override;
private:
// The URL of the CryptAuth endpoint serving the request.
diff --git a/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc b/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc
index 8888c65..89ebe7f 100644
--- a/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc
+++ b/components/proximity_auth/cryptauth/cryptauth_api_call_flow_unittest.cc
@@ -86,13 +86,13 @@ class ProximityAuthCryptAuthApiCallFlowTest
}
// net::TestURLFetcherDelegateForTests overrides.
- virtual void OnRequestStart(int fetcher_id) override {
+ void OnRequestStart(int fetcher_id) override {
url_fetcher_ = url_fetcher_factory_->GetFetcherByID(fetcher_id);
}
- virtual void OnChunkUpload(int fetcher_id) override {}
+ void OnChunkUpload(int fetcher_id) override {}
- virtual void OnRequestEnd(int fetcher_id) override {}
+ void OnRequestEnd(int fetcher_id) override {}
net::TestURLFetcher* url_fetcher_;
scoped_ptr<std::string> result_;