shill_property_handler.cc revision a36e5920737c6adbddd3e43b760e5de8431db6e0
1// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chromeos/network/shill_property_handler.h"
6
7#include "base/bind.h"
8#include "base/format_macros.h"
9#include "base/stl_util.h"
10#include "base/strings/string_util.h"
11#include "base/strings/stringprintf.h"
12#include "base/values.h"
13#include "chromeos/dbus/dbus_thread_manager.h"
14#include "chromeos/dbus/shill_device_client.h"
15#include "chromeos/dbus/shill_ipconfig_client.h"
16#include "chromeos/dbus/shill_manager_client.h"
17#include "chromeos/dbus/shill_profile_client.h"
18#include "chromeos/dbus/shill_service_client.h"
19#include "chromeos/network/network_event_log.h"
20#include "chromeos/network/network_state.h"
21#include "dbus/object_path.h"
22#include "third_party/cros_system_api/dbus/service_constants.h"
23
24namespace {
25
26// Limit the number of services or devices we observe. Since they are listed in
27// priority order, it should be reasonable to ignore services past this.
28const size_t kMaxObserved = 100;
29
30const base::ListValue* GetListValue(const std::string& key,
31                                    const base::Value& value) {
32  const base::ListValue* vlist = NULL;
33  if (!value.GetAsList(&vlist)) {
34    LOG(ERROR) << "Error parsing key as list: " << key;
35    return NULL;
36  }
37  return vlist;
38}
39
40}  // namespace
41
42namespace chromeos {
43namespace internal {
44
45// Class to manage Shill service property changed observers. Observers are
46// added on construction and removed on destruction. Runs the handler when
47// OnPropertyChanged is called.
48class ShillPropertyObserver : public ShillPropertyChangedObserver {
49 public:
50  typedef base::Callback<void(ManagedState::ManagedType type,
51                              const std::string& service,
52                              const std::string& name,
53                              const base::Value& value)> Handler;
54
55  ShillPropertyObserver(ManagedState::ManagedType type,
56                        const std::string& path,
57                        const Handler& handler)
58      : type_(type),
59        path_(path),
60        handler_(handler) {
61    if (type_ == ManagedState::MANAGED_TYPE_NETWORK) {
62      DBusThreadManager::Get()->GetShillServiceClient()->
63          AddPropertyChangedObserver(dbus::ObjectPath(path_), this);
64    } else if (type_ == ManagedState::MANAGED_TYPE_DEVICE) {
65      DBusThreadManager::Get()->GetShillDeviceClient()->
66          AddPropertyChangedObserver(dbus::ObjectPath(path_), this);
67    } else {
68      NOTREACHED();
69    }
70  }
71
72  virtual ~ShillPropertyObserver() {
73    if (type_ == ManagedState::MANAGED_TYPE_NETWORK) {
74      DBusThreadManager::Get()->GetShillServiceClient()->
75          RemovePropertyChangedObserver(dbus::ObjectPath(path_), this);
76    } else if (type_ == ManagedState::MANAGED_TYPE_DEVICE) {
77      DBusThreadManager::Get()->GetShillDeviceClient()->
78          RemovePropertyChangedObserver(dbus::ObjectPath(path_), this);
79    } else {
80      NOTREACHED();
81    }
82  }
83
84  // ShillPropertyChangedObserver overrides.
85  virtual void OnPropertyChanged(const std::string& key,
86                                 const base::Value& value) OVERRIDE {
87    handler_.Run(type_, path_, key, value);
88  }
89
90 private:
91  ManagedState::ManagedType type_;
92  std::string path_;
93  Handler handler_;
94
95  DISALLOW_COPY_AND_ASSIGN(ShillPropertyObserver);
96};
97
98//------------------------------------------------------------------------------
99// ShillPropertyHandler
100
101ShillPropertyHandler::ShillPropertyHandler(Listener* listener)
102    : listener_(listener),
103      shill_manager_(DBusThreadManager::Get()->GetShillManagerClient()) {
104}
105
106ShillPropertyHandler::~ShillPropertyHandler() {
107  // Delete network service observers.
108  STLDeleteContainerPairSecondPointers(
109      observed_networks_.begin(), observed_networks_.end());
110  STLDeleteContainerPairSecondPointers(
111      observed_devices_.begin(), observed_devices_.end());
112  CHECK(shill_manager_ == DBusThreadManager::Get()->GetShillManagerClient());
113  shill_manager_->RemovePropertyChangedObserver(this);
114}
115
116void ShillPropertyHandler::Init() {
117  UpdateManagerProperties();
118  shill_manager_->AddPropertyChangedObserver(this);
119}
120
121void ShillPropertyHandler::UpdateManagerProperties() {
122  NET_LOG_EVENT("UpdateManagerProperties", "");
123  shill_manager_->GetProperties(
124      base::Bind(&ShillPropertyHandler::ManagerPropertiesCallback,
125                 AsWeakPtr()));
126}
127
128bool ShillPropertyHandler::IsTechnologyAvailable(
129    const std::string& technology) const {
130  return available_technologies_.count(technology) != 0;
131}
132
133bool ShillPropertyHandler::IsTechnologyEnabled(
134    const std::string& technology) const {
135  return enabled_technologies_.count(technology) != 0;
136}
137
138bool ShillPropertyHandler::IsTechnologyEnabling(
139    const std::string& technology) const {
140  return enabling_technologies_.count(technology) != 0;
141}
142
143bool ShillPropertyHandler::IsTechnologyUninitialized(
144    const std::string& technology) const {
145  return uninitialized_technologies_.count(technology) != 0;
146}
147
148void ShillPropertyHandler::SetTechnologyEnabled(
149    const std::string& technology,
150    bool enabled,
151    const network_handler::ErrorCallback& error_callback) {
152  if (enabled) {
153    enabling_technologies_.insert(technology);
154    shill_manager_->EnableTechnology(
155        technology,
156        base::Bind(&base::DoNothing),
157        base::Bind(&ShillPropertyHandler::EnableTechnologyFailed,
158                   AsWeakPtr(), technology, error_callback));
159  } else {
160    // Immediately clear locally from enabled and enabling lists.
161    enabled_technologies_.erase(technology);
162    enabling_technologies_.erase(technology);
163    shill_manager_->DisableTechnology(
164        technology,
165        base::Bind(&base::DoNothing),
166        base::Bind(&network_handler::ShillErrorCallbackFunction,
167                   "SetTechnologyEnabled Failed",
168                   technology, error_callback));
169  }
170}
171
172void ShillPropertyHandler::SetCheckPortalList(
173    const std::string& check_portal_list) {
174  base::StringValue value(check_portal_list);
175  shill_manager_->SetProperty(
176      flimflam::kCheckPortalListProperty,
177      value,
178      base::Bind(&base::DoNothing),
179      base::Bind(&network_handler::ShillErrorCallbackFunction,
180                 "SetCheckPortalList Failed",
181                 "", network_handler::ErrorCallback()));
182}
183
184void ShillPropertyHandler::RequestScan() const {
185  shill_manager_->RequestScan(
186      "",
187      base::Bind(&base::DoNothing),
188      base::Bind(&network_handler::ShillErrorCallbackFunction,
189                 "RequestScan Failed",
190                 "", network_handler::ErrorCallback()));
191}
192
193void ShillPropertyHandler::ConnectToBestServices() const {
194  NET_LOG_EVENT("ConnectToBestServices", "");
195  shill_manager_->ConnectToBestServices(
196      base::Bind(&base::DoNothing),
197      base::Bind(&network_handler::ShillErrorCallbackFunction,
198                 "ConnectToBestServices Failed",
199                 "", network_handler::ErrorCallback()));
200}
201
202void ShillPropertyHandler::RequestProperties(ManagedState::ManagedType type,
203                                             const std::string& path) {
204  VLOG(2) << "Request Properties: " << type << " : " << path;
205  if (pending_updates_[type].find(path) != pending_updates_[type].end())
206    return;  // Update already requested.
207
208  pending_updates_[type].insert(path);
209  if (type == ManagedState::MANAGED_TYPE_NETWORK ||
210      type == ManagedState::MANAGED_TYPE_FAVORITE) {
211    DBusThreadManager::Get()->GetShillServiceClient()->GetProperties(
212        dbus::ObjectPath(path),
213        base::Bind(&ShillPropertyHandler::GetPropertiesCallback,
214                   AsWeakPtr(), type, path));
215  } else if (type == ManagedState::MANAGED_TYPE_DEVICE) {
216    DBusThreadManager::Get()->GetShillDeviceClient()->GetProperties(
217        dbus::ObjectPath(path),
218        base::Bind(&ShillPropertyHandler::GetPropertiesCallback,
219                   AsWeakPtr(), type, path));
220  } else {
221    NOTREACHED();
222  }
223}
224
225void ShillPropertyHandler::OnPropertyChanged(const std::string& key,
226                                             const base::Value& value) {
227  if (ManagerPropertyChanged(key, value)) {
228    std::string detail = key;
229    detail += " = " + network_event_log::ValueAsString(value);
230    NET_LOG_DEBUG("ManagerPropertyChanged", detail);
231    listener_->NotifyManagerPropertyChanged();
232  }
233  CheckPendingStateListUpdates(key);
234}
235
236//------------------------------------------------------------------------------
237// Private methods
238
239void ShillPropertyHandler::ManagerPropertiesCallback(
240    DBusMethodCallStatus call_status,
241    const base::DictionaryValue& properties) {
242  if (call_status != DBUS_METHOD_CALL_SUCCESS) {
243    NET_LOG_ERROR("ManagerPropertiesCallback",
244                  base::StringPrintf("Failed: %d", call_status));
245    return;
246  }
247  NET_LOG_EVENT("ManagerPropertiesCallback", "Success");
248  bool notify = false;
249  const base::Value* update_service_value = NULL;
250  const base::Value* update_service_complete_value = NULL;
251  for (base::DictionaryValue::Iterator iter(properties);
252       !iter.IsAtEnd(); iter.Advance()) {
253    // Defer updating Services until all other properties have been updated.
254    if (iter.key() == flimflam::kServicesProperty)
255      update_service_value = &iter.value();
256    else if (iter.key() == shill::kServiceCompleteListProperty)
257      update_service_complete_value = &iter.value();
258    else
259      notify |= ManagerPropertyChanged(iter.key(), iter.value());
260  }
261  // Update Services which can safely assume other properties have been set.
262  if (update_service_value) {
263    notify |= ManagerPropertyChanged(flimflam::kServicesProperty,
264                                     *update_service_value);
265  }
266  // Update ServiceCompleteList which skips entries that have already been
267  // requested for Services.
268  if (update_service_complete_value) {
269    notify |= ManagerPropertyChanged(shill::kServiceCompleteListProperty,
270                                     *update_service_complete_value);
271  }
272
273  if (notify)
274    listener_->NotifyManagerPropertyChanged();
275  CheckPendingStateListUpdates("");
276}
277
278void ShillPropertyHandler::CheckPendingStateListUpdates(
279    const std::string& key) {
280  // Once there are no pending updates, signal the state list changed callbacks.
281  if ((key.empty() || key == flimflam::kServicesProperty) &&
282      pending_updates_[ManagedState::MANAGED_TYPE_NETWORK].size() == 0) {
283    listener_->ManagedStateListChanged(ManagedState::MANAGED_TYPE_NETWORK);
284  }
285  // Both Network update requests and Favorite update requests will affect
286  // the list of favorites, so wait for both to complete.
287  if ((key.empty() || key == shill::kServiceCompleteListProperty) &&
288      pending_updates_[ManagedState::MANAGED_TYPE_NETWORK].size() == 0 &&
289      pending_updates_[ManagedState::MANAGED_TYPE_FAVORITE].size() == 0) {
290    listener_->ManagedStateListChanged(ManagedState::MANAGED_TYPE_FAVORITE);
291  }
292  if ((key.empty() || key == flimflam::kDevicesProperty) &&
293      pending_updates_[ManagedState::MANAGED_TYPE_DEVICE].size() == 0) {
294    listener_->ManagedStateListChanged(ManagedState::MANAGED_TYPE_DEVICE);
295  }
296}
297
298bool ShillPropertyHandler::ManagerPropertyChanged(const std::string& key,
299                                                  const base::Value& value) {
300  bool notify_manager_changed = false;
301  if (key == flimflam::kServicesProperty) {
302    const base::ListValue* vlist = GetListValue(key, value);
303    if (vlist) {
304      listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_NETWORK, *vlist);
305      UpdateProperties(ManagedState::MANAGED_TYPE_NETWORK, *vlist);
306      // UpdateObserved used to use kServiceWatchListProperty for TYPE_NETWORK,
307      // however that prevents us from receiving Strength updates from inactive
308      // networks. The overhead for observing all services is not unreasonable
309      // (and we limit the max number of observed services to kMaxObserved).
310      UpdateObserved(ManagedState::MANAGED_TYPE_NETWORK, *vlist);
311    }
312  } else if (key == shill::kServiceCompleteListProperty) {
313    const ListValue* vlist = GetListValue(key, value);
314    if (vlist) {
315      listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_FAVORITE, *vlist);
316      UpdateProperties(ManagedState::MANAGED_TYPE_FAVORITE, *vlist);
317    }
318  } else if (key == flimflam::kDevicesProperty) {
319    const base::ListValue* vlist = GetListValue(key, value);
320    if (vlist) {
321      listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_DEVICE, *vlist);
322      UpdateProperties(ManagedState::MANAGED_TYPE_DEVICE, *vlist);
323      UpdateObserved(ManagedState::MANAGED_TYPE_DEVICE, *vlist);
324    }
325  } else if (key == flimflam::kAvailableTechnologiesProperty) {
326    const base::ListValue* vlist = GetListValue(key, value);
327    if (vlist) {
328      UpdateAvailableTechnologies(*vlist);
329      notify_manager_changed = true;
330    }
331  } else if (key == flimflam::kEnabledTechnologiesProperty) {
332    const base::ListValue* vlist = GetListValue(key, value);
333    if (vlist) {
334      UpdateEnabledTechnologies(*vlist);
335      notify_manager_changed = true;
336    }
337  } else if (key == shill::kUninitializedTechnologiesProperty) {
338    const base::ListValue* vlist = GetListValue(key, value);
339    if (vlist) {
340      UpdateUninitializedTechnologies(*vlist);
341      notify_manager_changed = true;
342    }
343  } else if (key == flimflam::kProfilesProperty) {
344    listener_->ProfileListChanged();
345  } else if (key == flimflam::kCheckPortalListProperty) {
346    std::string check_portal_list;
347    if (value.GetAsString(&check_portal_list)) {
348      listener_->CheckPortalListChanged(check_portal_list);
349      notify_manager_changed = true;
350    }
351  } else {
352    VLOG(2) << "Ignored Manager Property: " << key;
353  }
354  return notify_manager_changed;
355}
356
357void ShillPropertyHandler::UpdateProperties(ManagedState::ManagedType type,
358                                            const base::ListValue& entries) {
359  std::set<std::string>& requested_updates = requested_updates_[type];
360  std::set<std::string>& requested_service_updates =
361      requested_updates_[ManagedState::MANAGED_TYPE_NETWORK];  // For favorites
362  std::set<std::string> new_requested_updates;
363  VLOG(2) << "Update Properties: " << type << " Entries: " << entries.GetSize();
364  for (base::ListValue::const_iterator iter = entries.begin();
365       iter != entries.end(); ++iter) {
366    std::string path;
367    (*iter)->GetAsString(&path);
368    if (path.empty())
369      continue;
370    if (type == ManagedState::MANAGED_TYPE_FAVORITE &&
371        requested_service_updates.count(path) > 0)
372      continue;  // Update already requested
373    if (requested_updates.find(path) == requested_updates.end())
374      RequestProperties(type, path);
375    new_requested_updates.insert(path);
376  }
377  requested_updates.swap(new_requested_updates);
378}
379
380void ShillPropertyHandler::UpdateObserved(ManagedState::ManagedType type,
381                                          const base::ListValue& entries) {
382  DCHECK(type == ManagedState::MANAGED_TYPE_NETWORK ||
383         type == ManagedState::MANAGED_TYPE_DEVICE);
384  ShillPropertyObserverMap& observer_map =
385      (type == ManagedState::MANAGED_TYPE_NETWORK)
386      ? observed_networks_ : observed_devices_;
387  ShillPropertyObserverMap new_observed;
388  for (base::ListValue::const_iterator iter1 = entries.begin();
389       iter1 != entries.end(); ++iter1) {
390    std::string path;
391    (*iter1)->GetAsString(&path);
392    if (path.empty())
393      continue;
394    ShillPropertyObserverMap::iterator iter2 = observer_map.find(path);
395    if (iter2 != observer_map.end()) {
396      new_observed[path] = iter2->second;
397    } else {
398      // Create an observer for future updates.
399      new_observed[path] = new ShillPropertyObserver(
400          type, path, base::Bind(
401              &ShillPropertyHandler::PropertyChangedCallback, AsWeakPtr()));
402      NET_LOG_DEBUG("StartObserving", path);
403    }
404    observer_map.erase(path);
405    // Limit the number of observed services.
406    if (new_observed.size() >= kMaxObserved)
407      break;
408  }
409  // Delete network service observers still in observer_map.
410  for (ShillPropertyObserverMap::iterator iter =  observer_map.begin();
411       iter != observer_map.end(); ++iter) {
412    NET_LOG_DEBUG("StopObserving", iter->first);
413    delete iter->second;
414  }
415  observer_map.swap(new_observed);
416}
417
418void ShillPropertyHandler::UpdateAvailableTechnologies(
419    const base::ListValue& technologies) {
420  available_technologies_.clear();
421  NET_LOG_EVENT("AvailableTechnologiesChanged",
422                base::StringPrintf("Size: %" PRIuS, technologies.GetSize()));
423  for (base::ListValue::const_iterator iter = technologies.begin();
424       iter != technologies.end(); ++iter) {
425    std::string technology;
426    (*iter)->GetAsString(&technology);
427    DCHECK(!technology.empty());
428    available_technologies_.insert(technology);
429  }
430}
431
432void ShillPropertyHandler::UpdateEnabledTechnologies(
433    const base::ListValue& technologies) {
434  enabled_technologies_.clear();
435  NET_LOG_EVENT("EnabledTechnologiesChanged",
436                base::StringPrintf("Size: %" PRIuS, technologies.GetSize()));
437  for (base::ListValue::const_iterator iter = technologies.begin();
438       iter != technologies.end(); ++iter) {
439    std::string technology;
440    (*iter)->GetAsString(&technology);
441    DCHECK(!technology.empty());
442    enabled_technologies_.insert(technology);
443    enabling_technologies_.erase(technology);
444  }
445}
446
447void ShillPropertyHandler::UpdateUninitializedTechnologies(
448    const base::ListValue& technologies) {
449  uninitialized_technologies_.clear();
450  NET_LOG_EVENT("UninitializedTechnologiesChanged",
451                base::StringPrintf("Size: %" PRIuS, technologies.GetSize()));
452  for (base::ListValue::const_iterator iter = technologies.begin();
453       iter != technologies.end(); ++iter) {
454    std::string technology;
455    (*iter)->GetAsString(&technology);
456    DCHECK(!technology.empty());
457    uninitialized_technologies_.insert(technology);
458  }
459}
460
461void ShillPropertyHandler::EnableTechnologyFailed(
462    const std::string& technology,
463    const network_handler::ErrorCallback& error_callback,
464    const std::string& dbus_error_name,
465    const std::string& dbus_error_message) {
466  enabling_technologies_.erase(technology);
467  network_handler::ShillErrorCallbackFunction(
468      "EnableTechnology Failed",
469      technology, error_callback,
470      dbus_error_name, dbus_error_message);
471}
472
473void ShillPropertyHandler::GetPropertiesCallback(
474    ManagedState::ManagedType type,
475    const std::string& path,
476    DBusMethodCallStatus call_status,
477    const base::DictionaryValue& properties) {
478  VLOG(2) << "GetPropertiesCallback: " << type << " : " << path;
479  pending_updates_[type].erase(path);
480  if (call_status != DBUS_METHOD_CALL_SUCCESS) {
481    NET_LOG_ERROR("Failed to get properties",
482                  base::StringPrintf("%s: %d", path.c_str(), call_status));
483    return;
484  }
485  listener_->UpdateManagedStateProperties(type, path, properties);
486  // Update Favorite properties for networks in the Services list.
487  if (type == ManagedState::MANAGED_TYPE_NETWORK) {
488    listener_->UpdateManagedStateProperties(
489        ManagedState::MANAGED_TYPE_FAVORITE, path, properties);
490  }
491  // Request IPConfig parameters for networks.
492  if (type == ManagedState::MANAGED_TYPE_NETWORK &&
493      properties.HasKey(shill::kIPConfigProperty)) {
494    std::string ip_config_path;
495    if (properties.GetString(shill::kIPConfigProperty, &ip_config_path)) {
496      DBusThreadManager::Get()->GetShillIPConfigClient()->GetProperties(
497          dbus::ObjectPath(ip_config_path),
498          base::Bind(&ShillPropertyHandler::GetIPConfigCallback,
499                     AsWeakPtr(), path));
500    }
501  }
502
503  // Notify the listener only when all updates for that type have completed.
504  if (pending_updates_[type].size() == 0) {
505    listener_->ManagedStateListChanged(type);
506    // Notify that Favorites have changed when notifying for Networks if there
507    // are no additional Favorite updates pending.
508    if (type == ManagedState::MANAGED_TYPE_NETWORK &&
509        pending_updates_[ManagedState::MANAGED_TYPE_FAVORITE].size() == 0) {
510      listener_->ManagedStateListChanged(ManagedState::MANAGED_TYPE_FAVORITE);
511    }
512  }
513}
514
515void ShillPropertyHandler::PropertyChangedCallback(
516    ManagedState::ManagedType type,
517    const std::string& path,
518    const std::string& key,
519    const base::Value& value) {
520  if (type == ManagedState::MANAGED_TYPE_NETWORK)
521    NetworkServicePropertyChangedCallback(path, key, value);
522  else if (type == ManagedState::MANAGED_TYPE_DEVICE)
523    NetworkDevicePropertyChangedCallback(path, key, value);
524  else
525    NOTREACHED();
526}
527
528void ShillPropertyHandler::NetworkServicePropertyChangedCallback(
529    const std::string& path,
530    const std::string& key,
531    const base::Value& value) {
532  if (key == shill::kIPConfigProperty) {
533    // Request the IPConfig for the network and update network properties
534    // when the request completes.
535    std::string ip_config_path;
536    value.GetAsString(&ip_config_path);
537    DCHECK(!ip_config_path.empty());
538    DBusThreadManager::Get()->GetShillIPConfigClient()->GetProperties(
539        dbus::ObjectPath(ip_config_path),
540        base::Bind(&ShillPropertyHandler::GetIPConfigCallback,
541                   AsWeakPtr(), path));
542  } else {
543    listener_->UpdateNetworkServiceProperty(path, key, value);
544  }
545}
546
547void ShillPropertyHandler::GetIPConfigCallback(
548    const std::string& service_path,
549    DBusMethodCallStatus call_status,
550    const base::DictionaryValue& properties)  {
551  if (call_status != DBUS_METHOD_CALL_SUCCESS) {
552    NET_LOG_ERROR("Failed to get IP Config properties",
553                  base::StringPrintf("%s: %d",
554                                     service_path.c_str(), call_status));
555    return;
556  }
557  UpdateIPConfigProperty(service_path, properties,
558                         flimflam::kAddressProperty);
559  UpdateIPConfigProperty(service_path, properties,
560                         flimflam::kNameServersProperty);
561  UpdateIPConfigProperty(service_path, properties,
562                         flimflam::kPrefixlenProperty);
563  UpdateIPConfigProperty(service_path, properties,
564                         flimflam::kGatewayProperty);
565}
566
567void ShillPropertyHandler::UpdateIPConfigProperty(
568    const std::string& service_path,
569    const base::DictionaryValue& properties,
570    const char* property) {
571  const base::Value* value;
572  if (!properties.GetWithoutPathExpansion(property, &value)) {
573    LOG(ERROR) << "Failed to get IPConfig property: " << property
574               << ", for: " << service_path;
575    return;
576  }
577  listener_->UpdateNetworkServiceProperty(
578      service_path, NetworkState::IPConfigProperty(property), *value);
579}
580
581void ShillPropertyHandler::NetworkDevicePropertyChangedCallback(
582    const std::string& path,
583    const std::string& key,
584    const base::Value& value) {
585  listener_->UpdateDeviceProperty(path, key, value);
586}
587
588}  // namespace internal
589}  // namespace chromeos
590