Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: chromeos/network/shill_property_handler.cc

Issue 13004024: Add ConnectToBestServices call when Certs are loaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/shill_property_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/shill_property_handler.cc
diff --git a/chromeos/network/shill_property_handler.cc b/chromeos/network/shill_property_handler.cc
index e3083cd0c84a00624f84dc727e5ff4e1234462cd..2041139ea131d04243aaf96d70afa9c7333b11de 100644
--- a/chromeos/network/shill_property_handler.cc
+++ b/chromeos/network/shill_property_handler.cc
@@ -100,8 +100,7 @@ class ShillPropertyObserver : public ShillPropertyChangedObserver {
ShillPropertyHandler::ShillPropertyHandler(Listener* listener)
: listener_(listener),
- shill_manager_(DBusThreadManager::Get()->GetShillManagerClient()),
- weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
+ shill_manager_(DBusThreadManager::Get()->GetShillManagerClient()) {
}
ShillPropertyHandler::~ShillPropertyHandler() {
@@ -117,7 +116,7 @@ ShillPropertyHandler::~ShillPropertyHandler() {
void ShillPropertyHandler::Init() {
shill_manager_->GetProperties(
base::Bind(&ShillPropertyHandler::ManagerPropertiesCallback,
- weak_ptr_factory_.GetWeakPtr()));
+ AsWeakPtr()));
shill_manager_->AddPropertyChangedObserver(this);
}
@@ -163,6 +162,14 @@ void ShillPropertyHandler::RequestScan() const {
kLogModule, "", network_handler::ErrorCallback()));
}
+void ShillPropertyHandler::ConnectToBestServices() const {
+ network_event_log::AddEntry(kLogModule, "ConnectToBestServices", "");
+ shill_manager_->ConnectToBestServices(
+ base::Bind(&base::DoNothing),
+ base::Bind(&network_handler::ShillErrorCallbackFunction,
+ kLogModule, "", network_handler::ErrorCallback()));
+}
+
void ShillPropertyHandler::RequestProperties(ManagedState::ManagedType type,
const std::string& path) {
if (pending_updates_[type].find(path) != pending_updates_[type].end())
@@ -173,12 +180,12 @@ void ShillPropertyHandler::RequestProperties(ManagedState::ManagedType type,
DBusThreadManager::Get()->GetShillServiceClient()->GetProperties(
dbus::ObjectPath(path),
base::Bind(&ShillPropertyHandler::GetPropertiesCallback,
- weak_ptr_factory_.GetWeakPtr(), type, path));
+ AsWeakPtr(), type, path));
} else if (type == ManagedState::MANAGED_TYPE_DEVICE) {
DBusThreadManager::Get()->GetShillDeviceClient()->GetProperties(
dbus::ObjectPath(path),
base::Bind(&ShillPropertyHandler::GetPropertiesCallback,
- weak_ptr_factory_.GetWeakPtr(), type, path));
+ AsWeakPtr(), type, path));
} else {
NOTREACHED();
}
@@ -297,8 +304,7 @@ void ShillPropertyHandler::UpdateObserved(ManagedState::ManagedType type,
// Create an observer for future updates.
new_observed[path] = new ShillPropertyObserver(
type, path, base::Bind(
- &ShillPropertyHandler::PropertyChangedCallback,
- weak_ptr_factory_.GetWeakPtr()));
+ &ShillPropertyHandler::PropertyChangedCallback, AsWeakPtr()));
network_event_log::AddEntry(kLogModule, "StartObserving", path);
}
observer_map.erase(path);
@@ -382,7 +388,7 @@ void ShillPropertyHandler::GetPropertiesCallback(
DBusThreadManager::Get()->GetShillIPConfigClient()->GetProperties(
dbus::ObjectPath(ip_config_path),
base::Bind(&ShillPropertyHandler::GetIPConfigCallback,
- weak_ptr_factory_.GetWeakPtr(), path));
+ AsWeakPtr(), path));
}
}
@@ -417,7 +423,7 @@ void ShillPropertyHandler::NetworkServicePropertyChangedCallback(
DBusThreadManager::Get()->GetShillIPConfigClient()->GetProperties(
dbus::ObjectPath(ip_config_path),
base::Bind(&ShillPropertyHandler::GetIPConfigCallback,
- weak_ptr_factory_.GetWeakPtr(), path));
+ AsWeakPtr(), path));
} else {
listener_->UpdateNetworkServiceProperty(path, key, value);
}
« no previous file with comments | « chromeos/network/shill_property_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698