diff options
author | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-01 21:50:22 +0000 |
---|---|---|
committer | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-01 21:50:22 +0000 |
commit | 8617f9894392027da2e5bb91a033e343acae9d34 (patch) | |
tree | a3d2c0aed37649bf74d36739613b772849dfdb2a /chromeos/dbus | |
parent | b042ecf69a057ca5ed09540e1a1b6aef28a8ee62 (diff) | |
download | chromium_src-8617f9894392027da2e5bb91a033e343acae9d34.zip chromium_src-8617f9894392027da2e5bb91a033e343acae9d34.tar.gz chromium_src-8617f9894392027da2e5bb91a033e343acae9d34.tar.bz2 |
Add ConnectToBestServices call when Certs are loaded
BUG=137711
Review URL: https://codereview.chromium.org/13004024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus')
-rw-r--r-- | chromeos/dbus/mock_shill_manager_client.h | 3 | ||||
-rw-r--r-- | chromeos/dbus/shill_manager_client.cc | 27 | ||||
-rw-r--r-- | chromeos/dbus/shill_manager_client.h | 22 | ||||
-rw-r--r-- | chromeos/dbus/shill_manager_client_stub.cc | 4 | ||||
-rw-r--r-- | chromeos/dbus/shill_manager_client_stub.h | 20 |
5 files changed, 52 insertions, 24 deletions
diff --git a/chromeos/dbus/mock_shill_manager_client.h b/chromeos/dbus/mock_shill_manager_client.h index 6179168..57f2449 100644 --- a/chromeos/dbus/mock_shill_manager_client.h +++ b/chromeos/dbus/mock_shill_manager_client.h @@ -68,6 +68,9 @@ class MockShillManagerClient : public ShillManagerClient { const std::string& data, const StringCallback& callback, const ErrorCallback& error_callback)); + MOCK_METHOD2(ConnectToBestServices, + void(const base::Closure& callback, + const ErrorCallback& error_callback)); MOCK_METHOD0(GetTestInterface, TestInterface*()); }; diff --git a/chromeos/dbus/shill_manager_client.cc b/chromeos/dbus/shill_manager_client.cc index 04d7bcf..e99a940 100644 --- a/chromeos/dbus/shill_manager_client.cc +++ b/chromeos/dbus/shill_manager_client.cc @@ -212,14 +212,15 @@ class ShillManagerClientImpl : public ShillManagerClient { error_callback); } - virtual void VerifyAndEncryptData(const std::string& certificate, - const std::string& public_key, - const std::string& nonce, - const std::string& signed_data, - const std::string& device_serial, - const std::string& data, - const StringCallback& callback, - const ErrorCallback& error_callback) OVERRIDE { + virtual void VerifyAndEncryptData( + const std::string& certificate, + const std::string& public_key, + const std::string& nonce, + const std::string& signed_data, + const std::string& device_serial, + const std::string& data, + const StringCallback& callback, + const ErrorCallback& error_callback) OVERRIDE { dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface, shill::kVerifyAndEncryptDataFunction); dbus::MessageWriter writer(&method_call); @@ -234,6 +235,16 @@ class ShillManagerClientImpl : public ShillManagerClient { error_callback); } + virtual void ConnectToBestServices( + const base::Closure& callback, + const ErrorCallback& error_callback) OVERRIDE { + dbus::MethodCall method_call(flimflam::kFlimflamManagerInterface, + shill::kConnectToBestServicesFunction); + helper_.CallVoidMethodWithErrorCallback(&method_call, + callback, + error_callback); + } + virtual TestInterface* GetTestInterface() OVERRIDE { return NULL; } diff --git a/chromeos/dbus/shill_manager_client.h b/chromeos/dbus/shill_manager_client.h index 352614b..bd05253 100644 --- a/chromeos/dbus/shill_manager_client.h +++ b/chromeos/dbus/shill_manager_client.h @@ -156,14 +156,20 @@ class CHROMEOS_EXPORT ShillManagerClient { // Verify that the given data corresponds to a trusted device, and return the // |data| encrypted using the |public_key| for the trusted device. If the // device is not trusted, return the empty string. - virtual void VerifyAndEncryptData(const std::string& certificate, - const std::string& public_key, - const std::string& nonce, - const std::string& signed_data, - const std::string& device_serial, - const std::string& data, - const StringCallback& callback, - const ErrorCallback& error_callback) = 0; + virtual void VerifyAndEncryptData( + const std::string& certificate, + const std::string& public_key, + const std::string& nonce, + const std::string& signed_data, + const std::string& device_serial, + const std::string& data, + const StringCallback& callback, + const ErrorCallback& error_callback) = 0; + + // For each technology present, connect to the "best" service available. + // Called once the user is logged in and certificates are loaded. + virtual void ConnectToBestServices(const base::Closure& callback, + const ErrorCallback& error_callback) = 0; // Returns an interface for testing (stub only), or returns NULL. virtual TestInterface* GetTestInterface() = 0; diff --git a/chromeos/dbus/shill_manager_client_stub.cc b/chromeos/dbus/shill_manager_client_stub.cc index 8681baf..468c727b 100644 --- a/chromeos/dbus/shill_manager_client_stub.cc +++ b/chromeos/dbus/shill_manager_client_stub.cc @@ -254,6 +254,10 @@ void ShillManagerClientStub::VerifyAndEncryptData( FROM_HERE, base::Bind(callback, "encrypted_data")); } +void ShillManagerClientStub::ConnectToBestServices( + const base::Closure& callback, + const ErrorCallback& error_callback) { +} ShillManagerClient::TestInterface* ShillManagerClientStub::GetTestInterface() { return this; diff --git a/chromeos/dbus/shill_manager_client_stub.h b/chromeos/dbus/shill_manager_client_stub.h index 44491be..1eb666d 100644 --- a/chromeos/dbus/shill_manager_client_stub.h +++ b/chromeos/dbus/shill_manager_client_stub.h @@ -70,14 +70,18 @@ class ShillManagerClientStub : public ShillManagerClient, const std::string& service_path, const StringCallback& callback, const ErrorCallback& error_callback) OVERRIDE; - virtual void VerifyAndEncryptData(const std::string& certificate, - const std::string& public_key, - const std::string& nonce, - const std::string& signed_data, - const std::string& device_serial, - const std::string& data, - const StringCallback& callback, - const ErrorCallback& error_callback) OVERRIDE; + virtual void VerifyAndEncryptData( + const std::string& certificate, + const std::string& public_key, + const std::string& nonce, + const std::string& signed_data, + const std::string& device_serial, + const std::string& data, + const StringCallback& callback, + const ErrorCallback& error_callback) OVERRIDE; + virtual void ConnectToBestServices( + const base::Closure& callback, + const ErrorCallback& error_callback) OVERRIDE; virtual ShillManagerClient::TestInterface* GetTestInterface() OVERRIDE; // ShillManagerClient::TestInterface overrides. |