cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / ios / chrome / browser / prefs / pref_observer_bridge.mm
blobebd82f78e7d39b692b4bf86ec25c7157724c7028
1 // Copyright 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.
5 #import "ios/chrome/browser/prefs/pref_observer_bridge.h"
7 #include "base/bind.h"
8 #include "base/prefs/pref_change_registrar.h"
10 PrefObserverBridge::PrefObserverBridge(id<PrefObserverDelegate> delegate)
11     : delegate_(delegate) {
14 PrefObserverBridge::~PrefObserverBridge() {
17 void PrefObserverBridge::ObserveChangesForPreference(
18     const std::string& pref_name,
19     PrefChangeRegistrar* registrar) {
20   PrefChangeRegistrar::NamedChangeCallback callback = base::Bind(
21       &PrefObserverBridge::OnPreferenceChanged, base::Unretained(this));
22   registrar->Add(pref_name.c_str(), callback);
25 void PrefObserverBridge::OnPreferenceChanged(const std::string& pref_name) {
26   [delegate_ onPreferenceChanged:pref_name];