1 // Copyright (c) 2011 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 "chrome/browser/ui/webui/options/chromeos/cros_options_page_ui_handler.h" 6 7 #include "base/values.h" 8 #include "chrome/browser/chromeos/cros_settings.h" 9 10 namespace chromeos { 11 CrosOptionsPageUIHandler(CrosSettingsProvider * provider)12CrosOptionsPageUIHandler::CrosOptionsPageUIHandler( 13 CrosSettingsProvider* provider) : settings_provider_(provider) { 14 if (settings_provider_.get()) 15 CrosSettings::Get()->AddSettingsProvider(settings_provider_.get()); 16 } 17 ~CrosOptionsPageUIHandler()18CrosOptionsPageUIHandler::~CrosOptionsPageUIHandler() { 19 if (settings_provider_.get()) 20 CrosSettings::Get()->RemoveSettingsProvider(settings_provider_.get()); 21 } 22 23 } // namespace chromeos 24