Chromium Code Reviews

Side by Side Diff: chrome/browser/prefs/scoped_pref_update.cc

Issue 5441002: Clean up pref change notification handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prefs/scoped_pref_update.h" 5 #include "chrome/browser/prefs/scoped_pref_update.h"
6 6
7 #include "chrome/browser/prefs/pref_notifier.h" 7 #include "chrome/browser/prefs/pref_notifier.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 9
10 ScopedPrefUpdate::ScopedPrefUpdate(PrefService* service, const char* path) 10 ScopedPrefUpdate::ScopedPrefUpdate(PrefService* service, const char* path)
11 : service_(service), 11 : service_(service),
12 path_(path) {} 12 path_(path) {}
13 13
14 ScopedPrefUpdate::~ScopedPrefUpdate() { 14 ScopedPrefUpdate::~ScopedPrefUpdate() {
15 service_->pref_notifier()->FireObservers(path_.c_str()); 15 service_->pref_notifier()->OnPreferenceChanged(path_.c_str());
16 } 16 }
OLDNEW

Powered by Google App Engine