blob: 5e74ee3f390642d64cd84e98b7c6f9c22252a961 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/utf_string_conversions.h" // TODO(viettrungluu): remove
#include "chrome/browser/pref_service.h"
#include "chrome/browser/scoped_pref_update.h"
ScopedPrefUpdate::ScopedPrefUpdate(PrefService* service, const char* path)
: service_(service),
path_(path) {}
// TODO(viettrungluu): deprecate and remove #include
ScopedPrefUpdate::ScopedPrefUpdate(PrefService* service, const wchar_t* path)
: service_(service),
path_(WideToUTF8(path)) {}
ScopedPrefUpdate::~ScopedPrefUpdate() {
service_->FireObservers(path_.c_str());
}
|