cros_settings_provider.cc 798 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2013 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. #include "ash/components/settings/cros_settings_provider.h"
  5. #include "base/command_line.h"
  6. #include "base/strings/string_util.h"
  7. #include "base/values.h"
  8. namespace ash {
  9. CrosSettingsProvider::CrosSettingsProvider(
  10. const NotifyObserversCallback& notify_cb)
  11. : notify_cb_(notify_cb) {
  12. }
  13. CrosSettingsProvider::~CrosSettingsProvider() = default;
  14. void CrosSettingsProvider::NotifyObservers(const std::string& path) {
  15. if (!notify_cb_.is_null())
  16. notify_cb_.Run(path);
  17. }
  18. void CrosSettingsProvider::SetNotifyObserversCallback(
  19. const NotifyObserversCallback& notify_cb) {
  20. notify_cb_ = notify_cb;
  21. }
  22. } // namespace ash