diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-12 11:36:05 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-12 11:36:05 +0000 |
commit | 0abb67122bf392d5a12439d3af400e9319aac8e9 (patch) | |
tree | 0a17681e20265f0b7d39fccc29d3ae30f4757751 /chrome/browser | |
parent | deef134411d599e09e66aadedd1b1f2328a9f56f (diff) | |
download | chromium_src-0abb67122bf392d5a12439d3af400e9319aac8e9.zip chromium_src-0abb67122bf392d5a12439d3af400e9319aac8e9.tar.gz chromium_src-0abb67122bf392d5a12439d3af400e9319aac8e9.tar.bz2 |
Move PrefMember to base/prefs/public now that it has no bad dependencies.
Move PrefObserver out of base/prefs/public to base/prefs/ since it is
now an internal implementation detail.
Update .gyp(i) files to match.
The rest is just mechanical updates to include paths and such,
generated by the tools/git/move_source_file.py script.
TBR=brettw@chromium.org
BUG=155525
Review URL: https://chromiumcodereview.appspot.com/11459002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
69 files changed, 68 insertions, 911 deletions
diff --git a/chrome/browser/api/prefs/DEPS b/chrome/browser/api/prefs/DEPS deleted file mode 100644 index 79439f0..0000000 --- a/chrome/browser/api/prefs/DEPS +++ /dev/null @@ -1,6 +0,0 @@ -# TODO(joi): Bring back to zero. -specific_include_rules = { - ".*[a-z]+test\.cc": [ - "!chrome/browser/prefs", - ], -} diff --git a/chrome/browser/api/prefs/OWNERS b/chrome/browser/api/prefs/OWNERS deleted file mode 100644 index 024da1c..0000000 --- a/chrome/browser/api/prefs/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -battre@chromium.org -bauerb@chromium.org -mnissler@chromium.org -pam@chromium.org diff --git a/chrome/browser/api/prefs/pref_member.cc b/chrome/browser/api/prefs/pref_member.cc deleted file mode 100644 index 51a3d8b..0000000 --- a/chrome/browser/api/prefs/pref_member.cc +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) 2012 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 "chrome/browser/api/prefs/pref_member.h" - -#include "base/bind_helpers.h" -#include "base/callback.h" -#include "base/location.h" -#include "base/prefs/public/pref_service_base.h" -#include "base/value_conversions.h" - -using base::MessageLoopProxy; - -namespace subtle { - -PrefMemberBase::PrefMemberBase() - : prefs_(NULL), - setting_value_(false) { -} - -PrefMemberBase::~PrefMemberBase() { - Destroy(); -} - -void PrefMemberBase::Init(const char* pref_name, - PrefServiceBase* prefs, - const NamedChangeCallback& observer) { - observer_ = observer; - Init(pref_name, prefs); -} - -void PrefMemberBase::Init(const char* pref_name, - PrefServiceBase* prefs) { - DCHECK(pref_name); - DCHECK(prefs); - DCHECK(pref_name_.empty()); // Check that Init is only called once. - prefs_ = prefs; - pref_name_ = pref_name; - // Check that the preference is registered. - DCHECK(prefs_->FindPreference(pref_name_.c_str())) - << pref_name << " not registered."; - - // Add ourselves as a pref observer so we can keep our local value in sync. - prefs_->AddPrefObserver(pref_name, this); -} - -void PrefMemberBase::Destroy() { - if (prefs_ && !pref_name_.empty()) { - prefs_->RemovePrefObserver(pref_name_.c_str(), this); - prefs_ = NULL; - } -} - -void PrefMemberBase::MoveToThread( - const scoped_refptr<MessageLoopProxy>& message_loop) { - VerifyValuePrefName(); - // Load the value from preferences if it hasn't been loaded so far. - if (!internal()) - UpdateValueFromPref(base::Closure()); - internal()->MoveToThread(message_loop); -} - -void PrefMemberBase::OnPreferenceChanged(PrefServiceBase* service, - const std::string& pref_name) { - VerifyValuePrefName(); - UpdateValueFromPref((!setting_value_ && !observer_.is_null()) ? - base::Bind(observer_, pref_name) : base::Closure()); -} - -void PrefMemberBase::UpdateValueFromPref(const base::Closure& callback) const { - VerifyValuePrefName(); - const PrefServiceBase::Preference* pref = - prefs_->FindPreference(pref_name_.c_str()); - DCHECK(pref); - if (!internal()) - CreateInternal(); - internal()->UpdateValue(pref->GetValue()->DeepCopy(), - pref->IsManaged(), - pref->IsUserModifiable(), - callback); -} - -void PrefMemberBase::VerifyPref() const { - VerifyValuePrefName(); - if (!internal()) - UpdateValueFromPref(base::Closure()); -} - -void PrefMemberBase::InvokeUnnamedCallback(const base::Closure& callback, - const std::string& pref_name) { - callback.Run(); -} - -PrefMemberBase::Internal::Internal() - : thread_loop_(MessageLoopProxy::current()), - is_managed_(false) { -} -PrefMemberBase::Internal::~Internal() { } - -bool PrefMemberBase::Internal::IsOnCorrectThread() const { - // In unit tests, there may not be a message loop. - return thread_loop_ == NULL || thread_loop_->BelongsToCurrentThread(); -} - -void PrefMemberBase::Internal::UpdateValue( - Value* v, - bool is_managed, - bool is_user_modifiable, - const base::Closure& callback) const { - scoped_ptr<Value> value(v); - base::ScopedClosureRunner closure_runner(callback); - if (IsOnCorrectThread()) { - bool rv = UpdateValueInternal(*value); - DCHECK(rv); - is_managed_ = is_managed; - is_user_modifiable_ = is_user_modifiable; - } else { - bool may_run = thread_loop_->PostTask( - FROM_HERE, - base::Bind(&PrefMemberBase::Internal::UpdateValue, this, - value.release(), is_managed, is_user_modifiable, - closure_runner.Release())); - DCHECK(may_run); - } -} - -void PrefMemberBase::Internal::MoveToThread( - const scoped_refptr<MessageLoopProxy>& message_loop) { - CheckOnCorrectThread(); - thread_loop_ = message_loop; -} - -bool PrefMemberVectorStringUpdate(const Value& value, - std::vector<std::string>* string_vector) { - if (!value.IsType(Value::TYPE_LIST)) - return false; - const ListValue* list = static_cast<const ListValue*>(&value); - - std::vector<std::string> local_vector; - for (ListValue::const_iterator it = list->begin(); it != list->end(); ++it) { - std::string string_value; - if (!(*it)->GetAsString(&string_value)) - return false; - - local_vector.push_back(string_value); - } - - string_vector->swap(local_vector); - return true; -} - -} // namespace subtle - -template <> -void PrefMember<bool>::UpdatePref(const bool& value) { - prefs()->SetBoolean(pref_name().c_str(), value); -} - -template <> -bool PrefMember<bool>::Internal::UpdateValueInternal(const Value& value) const { - return value.GetAsBoolean(&value_); -} - -template <> -void PrefMember<int>::UpdatePref(const int& value) { - prefs()->SetInteger(pref_name().c_str(), value); -} - -template <> -bool PrefMember<int>::Internal::UpdateValueInternal(const Value& value) const { - return value.GetAsInteger(&value_); -} - -template <> -void PrefMember<double>::UpdatePref(const double& value) { - prefs()->SetDouble(pref_name().c_str(), value); -} - -template <> -bool PrefMember<double>::Internal::UpdateValueInternal(const Value& value) - const { - return value.GetAsDouble(&value_); -} - -template <> -void PrefMember<std::string>::UpdatePref(const std::string& value) { - prefs()->SetString(pref_name().c_str(), value); -} - -template <> -bool PrefMember<std::string>::Internal::UpdateValueInternal(const Value& value) - const { - return value.GetAsString(&value_); -} - -template <> -void PrefMember<FilePath>::UpdatePref(const FilePath& value) { - prefs()->SetFilePath(pref_name().c_str(), value); -} - -template <> -bool PrefMember<FilePath>::Internal::UpdateValueInternal(const Value& value) - const { - return base::GetValueAsFilePath(value, &value_); -} - -template <> -void PrefMember<std::vector<std::string> >::UpdatePref( - const std::vector<std::string>& value) { - ListValue list_value; - list_value.AppendStrings(value); - prefs()->Set(pref_name().c_str(), list_value); -} - -template <> -bool PrefMember<std::vector<std::string> >::Internal::UpdateValueInternal( - const Value& value) const { - return subtle::PrefMemberVectorStringUpdate(value, &value_); -} diff --git a/chrome/browser/api/prefs/pref_member.h b/chrome/browser/api/prefs/pref_member.h deleted file mode 100644 index 495ea06..0000000 --- a/chrome/browser/api/prefs/pref_member.h +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright (c) 2012 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. -// -// A helper class that stays in sync with a preference (bool, int, real, -// string or filepath). For example: -// -// class MyClass { -// public: -// MyClass(PrefService* prefs) { -// my_string_.Init(prefs::kHomePage, prefs); -// } -// private: -// StringPrefMember my_string_; -// }; -// -// my_string_ should stay in sync with the prefs::kHomePage pref and will -// update if either the pref changes or if my_string_.SetValue is called. -// -// An optional observer can be passed into the Init method which can be used to -// notify MyClass of changes. Note that if you use SetValue(), the observer -// will not be notified. - -#ifndef CHROME_BROWSER_API_PREFS_PREF_MEMBER_H_ -#define CHROME_BROWSER_API_PREFS_PREF_MEMBER_H_ - -#include <string> -#include <vector> - -#include "base/basictypes.h" -#include "base/bind.h" -#include "base/callback_forward.h" -#include "base/file_path.h" -#include "base/logging.h" -#include "base/memory/ref_counted.h" -#include "base/message_loop_proxy.h" -#include "base/prefs/public/pref_observer.h" -#include "base/values.h" - -class PrefServiceBase; - -namespace subtle { - -class PrefMemberBase : public PrefObserver { - public: - // Type of callback you can register if you need to know the name of - // the pref that is changing. - typedef base::Callback<void(const std::string&)> NamedChangeCallback; - - PrefServiceBase* prefs() { return prefs_; } - const PrefServiceBase* prefs() const { return prefs_; } - - protected: - class Internal : public base::RefCountedThreadSafe<Internal> { - public: - Internal(); - - // Update the value, either by calling |UpdateValueInternal| directly - // or by dispatching to the right thread. - // Takes ownership of |value|. - void UpdateValue(base::Value* value, - bool is_managed, - bool is_user_modifiable, - const base::Closure& callback) const; - - void MoveToThread( - const scoped_refptr<base::MessageLoopProxy>& message_loop); - - // See PrefMember<> for description. - bool IsManaged() const { - return is_managed_; - } - - bool IsUserModifiable() const { - return is_user_modifiable_; - } - - protected: - friend class base::RefCountedThreadSafe<Internal>; - virtual ~Internal(); - - void CheckOnCorrectThread() const { - DCHECK(IsOnCorrectThread()); - } - - private: - // This method actually updates the value. It should only be called from - // the thread the PrefMember is on. - virtual bool UpdateValueInternal(const base::Value& value) const = 0; - - bool IsOnCorrectThread() const; - - scoped_refptr<base::MessageLoopProxy> thread_loop_; - mutable bool is_managed_; - mutable bool is_user_modifiable_; - - DISALLOW_COPY_AND_ASSIGN(Internal); - }; - - PrefMemberBase(); - virtual ~PrefMemberBase(); - - // See PrefMember<> for description. - void Init(const char* pref_name, PrefServiceBase* prefs, - const NamedChangeCallback& observer); - void Init(const char* pref_name, PrefServiceBase* prefs); - - virtual void CreateInternal() const = 0; - - // See PrefMember<> for description. - void Destroy(); - - void MoveToThread(const scoped_refptr<base::MessageLoopProxy>& message_loop); - - // PrefObserver - virtual void OnPreferenceChanged(PrefServiceBase* service, - const std::string& pref_name) OVERRIDE; - - void VerifyValuePrefName() const { - DCHECK(!pref_name_.empty()); - } - - // This method is used to do the actual sync with the preference. - // Note: it is logically const, because it doesn't modify the state - // seen by the outside world. It is just doing a lazy load behind the scenes. - void UpdateValueFromPref(const base::Closure& callback) const; - - // Verifies the preference name, and lazily loads the preference value if - // it hasn't been loaded yet. - void VerifyPref() const; - - const std::string& pref_name() const { return pref_name_; } - - virtual Internal* internal() const = 0; - - // Used to allow registering plain base::Closure callbacks. - static void InvokeUnnamedCallback(const base::Closure& callback, - const std::string& pref_name); - - private: - // Ordered the members to compact the class instance. - std::string pref_name_; - NamedChangeCallback observer_; - PrefServiceBase* prefs_; - - protected: - bool setting_value_; -}; - -// This function implements StringListPrefMember::UpdateValue(). -// It is exposed here for testing purposes. -bool PrefMemberVectorStringUpdate(const Value& value, - std::vector<std::string>* string_vector); - -} // namespace subtle - -template <typename ValueType> -class PrefMember : public subtle::PrefMemberBase { - public: - // Defer initialization to an Init method so it's easy to make this class be - // a member variable. - PrefMember() {} - virtual ~PrefMember() {} - - // Do the actual initialization of the class. Use the two-parameter - // version if you don't want any notifications of changes. This - // method should only be called on the UI thread. - void Init(const char* pref_name, PrefServiceBase* prefs, - const NamedChangeCallback& observer) { - subtle::PrefMemberBase::Init(pref_name, prefs, observer); - } - void Init(const char* pref_name, PrefServiceBase* prefs, - const base::Closure& observer) { - subtle::PrefMemberBase::Init( - pref_name, prefs, - base::Bind(&PrefMemberBase::InvokeUnnamedCallback, observer)); - } - void Init(const char* pref_name, PrefServiceBase* prefs) { - subtle::PrefMemberBase::Init(pref_name, prefs); - } - - // Unsubscribes the PrefMember from the PrefService. After calling this - // function, the PrefMember may not be used any more on the UI thread. - // Assuming |MoveToThread| was previously called, |GetValue|, |IsManaged|, - // and |IsUserModifiable| can still be called from the other thread but - // the results will no longer update from the PrefService. - // This method should only be called on the UI thread. - void Destroy() { - subtle::PrefMemberBase::Destroy(); - } - - // Moves the PrefMember to another thread, allowing read accesses from there. - // Changes from the PrefService will be propagated asynchronously - // via PostTask. - // This method should only be used from the thread the PrefMember is currently - // on, which is the UI thread by default. - void MoveToThread(const scoped_refptr<base::MessageLoopProxy>& message_loop) { - subtle::PrefMemberBase::MoveToThread(message_loop); - } - - // Check whether the pref is managed, i.e. controlled externally through - // enterprise configuration management (e.g. windows group policy). Returns - // false for unknown prefs. - // This method should only be used from the thread the PrefMember is currently - // on, which is the UI thread unless changed by |MoveToThread|. - bool IsManaged() const { - VerifyPref(); - return internal_->IsManaged(); - } - - // Checks whether the pref can be modified by the user. This returns false - // when the pref is managed by a policy or an extension, and when a command - // line flag overrides the pref. - // This method should only be used from the thread the PrefMember is currently - // on, which is the UI thread unless changed by |MoveToThread|. - bool IsUserModifiable() const { - VerifyPref(); - return internal_->IsUserModifiable(); - } - - // Retrieve the value of the member variable. - // This method should only be used from the thread the PrefMember is currently - // on, which is the UI thread unless changed by |MoveToThread|. - ValueType GetValue() const { - VerifyPref(); - return internal_->value(); - } - - // Provided as a convenience. - ValueType operator*() const { - return GetValue(); - } - - // Set the value of the member variable. - // This method should only be called on the UI thread. - void SetValue(const ValueType& value) { - VerifyValuePrefName(); - setting_value_ = true; - UpdatePref(value); - setting_value_ = false; - } - - // Returns the pref name. - const std::string& GetPrefName() const { - return pref_name(); - } - - private: - class Internal : public subtle::PrefMemberBase::Internal { - public: - Internal() : value_(ValueType()) {} - - ValueType value() { - CheckOnCorrectThread(); - return value_; - } - - protected: - virtual ~Internal() {} - - virtual bool UpdateValueInternal(const base::Value& value) const OVERRIDE; - - // We cache the value of the pref so we don't have to keep walking the pref - // tree. - mutable ValueType value_; - - DISALLOW_COPY_AND_ASSIGN(Internal); - }; - - virtual Internal* internal() const OVERRIDE { return internal_; } - virtual void CreateInternal() const OVERRIDE { - internal_ = new Internal(); - } - - // This method is used to do the actual sync with pref of the specified type. - void UpdatePref(const ValueType& value); - - mutable scoped_refptr<Internal> internal_; - - DISALLOW_COPY_AND_ASSIGN(PrefMember); -}; - -typedef PrefMember<bool> BooleanPrefMember; -typedef PrefMember<int> IntegerPrefMember; -typedef PrefMember<double> DoublePrefMember; -typedef PrefMember<std::string> StringPrefMember; -typedef PrefMember<FilePath> FilePathPrefMember; -// This preference member is expensive for large string arrays. -typedef PrefMember<std::vector<std::string> > StringListPrefMember; - -#endif // CHROME_BROWSER_API_PREFS_PREF_MEMBER_H_ diff --git a/chrome/browser/api/prefs/pref_member_unittest.cc b/chrome/browser/api/prefs/pref_member_unittest.cc deleted file mode 100644 index 996c1a7..0000000 --- a/chrome/browser/api/prefs/pref_member_unittest.cc +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright (c) 2011 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 "chrome/browser/api/prefs/pref_member.h" - -#include "base/bind.h" -#include "base/message_loop.h" -#include "chrome/browser/prefs/pref_value_store.h" -#include "chrome/common/chrome_notification_types.h" -#include "chrome/test/base/testing_pref_service.h" -#include "content/public/browser/notification_details.h" -#include "content/public/browser/notification_source.h" -#include "content/public/test/test_browser_thread.h" -#include "testing/gtest/include/gtest/gtest.h" - -using content::BrowserThread; - -namespace { - -const char kBoolPref[] = "bool"; -const char kIntPref[] = "int"; -const char kDoublePref[] = "double"; -const char kStringPref[] = "string"; -const char kStringListPref[] = "string_list"; - -void RegisterTestPrefs(PrefService* prefs) { - prefs->RegisterBooleanPref(kBoolPref, false, PrefService::UNSYNCABLE_PREF); - prefs->RegisterIntegerPref(kIntPref, 0, PrefService::UNSYNCABLE_PREF); - prefs->RegisterDoublePref(kDoublePref, 0.0, PrefService::UNSYNCABLE_PREF); - prefs->RegisterStringPref(kStringPref, - "default", - PrefService::UNSYNCABLE_PREF); - prefs->RegisterListPref(kStringListPref, - new ListValue(), - PrefService::UNSYNCABLE_PREF); -} - -class GetPrefValueCallback - : public base::RefCountedThreadSafe<GetPrefValueCallback> { - public: - GetPrefValueCallback() : value_(false) {} - - void Init(const char* pref_name, PrefService* prefs) { - pref_.Init(pref_name, prefs); - pref_.MoveToThread( - BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); - } - - void Destroy() { - pref_.Destroy(); - } - - bool FetchValue() { - if (!BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - base::Bind(&GetPrefValueCallback::GetPrefValueOnIOThread, this))) { - return false; - } - MessageLoop::current()->Run(); - return true; - } - - bool value() { return value_; } - - private: - friend class base::RefCountedThreadSafe<GetPrefValueCallback>; - ~GetPrefValueCallback() {} - - void GetPrefValueOnIOThread() { - value_ = pref_.GetValue(); - BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, - MessageLoop::QuitClosure()); - } - - BooleanPrefMember pref_; - bool value_; -}; - -class PrefMemberTestClass { - public: - explicit PrefMemberTestClass(PrefService* prefs) - : observe_cnt_(0), prefs_(prefs) { - str_.Init(kStringPref, prefs, - base::Bind(&PrefMemberTestClass::OnPreferenceChanged, - base::Unretained(this))); - } - - void OnPreferenceChanged(const std::string& pref_name) { - EXPECT_EQ(pref_name, kStringPref); - EXPECT_EQ(str_.GetValue(), prefs_->GetString(kStringPref)); - ++observe_cnt_; - } - - StringPrefMember str_; - int observe_cnt_; - - private: - PrefService* prefs_; -}; - -} // anonymous namespace - -TEST(PrefMemberTest, BasicGetAndSet) { - TestingPrefService prefs; - RegisterTestPrefs(&prefs); - - // Test bool - BooleanPrefMember boolean; - boolean.Init(kBoolPref, &prefs); - - // Check the defaults - EXPECT_FALSE(prefs.GetBoolean(kBoolPref)); - EXPECT_FALSE(boolean.GetValue()); - EXPECT_FALSE(*boolean); - - // Try changing through the member variable. - boolean.SetValue(true); - EXPECT_TRUE(boolean.GetValue()); - EXPECT_TRUE(prefs.GetBoolean(kBoolPref)); - EXPECT_TRUE(*boolean); - - // Try changing back through the pref. - prefs.SetBoolean(kBoolPref, false); - EXPECT_FALSE(prefs.GetBoolean(kBoolPref)); - EXPECT_FALSE(boolean.GetValue()); - EXPECT_FALSE(*boolean); - - // Test int - IntegerPrefMember integer; - integer.Init(kIntPref, &prefs); - - // Check the defaults - EXPECT_EQ(0, prefs.GetInteger(kIntPref)); - EXPECT_EQ(0, integer.GetValue()); - EXPECT_EQ(0, *integer); - - // Try changing through the member variable. - integer.SetValue(5); - EXPECT_EQ(5, integer.GetValue()); - EXPECT_EQ(5, prefs.GetInteger(kIntPref)); - EXPECT_EQ(5, *integer); - - // Try changing back through the pref. - prefs.SetInteger(kIntPref, 2); - EXPECT_EQ(2, prefs.GetInteger(kIntPref)); - EXPECT_EQ(2, integer.GetValue()); - EXPECT_EQ(2, *integer); - - // Test double - DoublePrefMember double_member; - double_member.Init(kDoublePref, &prefs); - - // Check the defaults - EXPECT_EQ(0.0, prefs.GetDouble(kDoublePref)); - EXPECT_EQ(0.0, double_member.GetValue()); - EXPECT_EQ(0.0, *double_member); - - // Try changing through the member variable. - double_member.SetValue(1.0); - EXPECT_EQ(1.0, double_member.GetValue()); - EXPECT_EQ(1.0, prefs.GetDouble(kDoublePref)); - EXPECT_EQ(1.0, *double_member); - - // Try changing back through the pref. - prefs.SetDouble(kDoublePref, 3.0); - EXPECT_EQ(3.0, prefs.GetDouble(kDoublePref)); - EXPECT_EQ(3.0, double_member.GetValue()); - EXPECT_EQ(3.0, *double_member); - - // Test string - StringPrefMember string; - string.Init(kStringPref, &prefs); - - // Check the defaults - EXPECT_EQ("default", prefs.GetString(kStringPref)); - EXPECT_EQ("default", string.GetValue()); - EXPECT_EQ("default", *string); - - // Try changing through the member variable. - string.SetValue("foo"); - EXPECT_EQ("foo", string.GetValue()); - EXPECT_EQ("foo", prefs.GetString(kStringPref)); - EXPECT_EQ("foo", *string); - - // Try changing back through the pref. - prefs.SetString(kStringPref, "bar"); - EXPECT_EQ("bar", prefs.GetString(kStringPref)); - EXPECT_EQ("bar", string.GetValue()); - EXPECT_EQ("bar", *string); - - // Test string list - ListValue expected_list; - std::vector<std::string> expected_vector; - StringListPrefMember string_list; - string_list.Init(kStringListPref, &prefs); - - // Check the defaults - EXPECT_TRUE(expected_list.Equals(prefs.GetList(kStringListPref))); - EXPECT_EQ(expected_vector, string_list.GetValue()); - EXPECT_EQ(expected_vector, *string_list); - - // Try changing through the pref member. - expected_list.AppendString("foo"); - expected_vector.push_back("foo"); - string_list.SetValue(expected_vector); - - EXPECT_TRUE(expected_list.Equals(prefs.GetList(kStringListPref))); - EXPECT_EQ(expected_vector, string_list.GetValue()); - EXPECT_EQ(expected_vector, *string_list); - - // Try adding through the pref. - expected_list.AppendString("bar"); - expected_vector.push_back("bar"); - prefs.Set(kStringListPref, expected_list); - - EXPECT_TRUE(expected_list.Equals(prefs.GetList(kStringListPref))); - EXPECT_EQ(expected_vector, string_list.GetValue()); - EXPECT_EQ(expected_vector, *string_list); - - // Try removing through the pref. - expected_list.Remove(0, NULL); - expected_vector.erase(expected_vector.begin()); - prefs.Set(kStringListPref, expected_list); - - EXPECT_TRUE(expected_list.Equals(prefs.GetList(kStringListPref))); - EXPECT_EQ(expected_vector, string_list.GetValue()); - EXPECT_EQ(expected_vector, *string_list); -} - -TEST(PrefMemberTest, InvalidList) { - // Set the vector to an initial good value. - std::vector<std::string> expected_vector; - expected_vector.push_back("foo"); - - // Try to add a valid list first. - ListValue list; - list.AppendString("foo"); - std::vector<std::string> vector; - EXPECT_TRUE(subtle::PrefMemberVectorStringUpdate(list, &vector)); - EXPECT_EQ(expected_vector, vector); - - // Now try to add an invalid list. |vector| should not be changed. - list.AppendInteger(0); - EXPECT_FALSE(subtle::PrefMemberVectorStringUpdate(list, &vector)); - EXPECT_EQ(expected_vector, vector); -} - -TEST(PrefMemberTest, TwoPrefs) { - // Make sure two DoublePrefMembers stay in sync. - TestingPrefService prefs; - RegisterTestPrefs(&prefs); - - DoublePrefMember pref1; - pref1.Init(kDoublePref, &prefs); - DoublePrefMember pref2; - pref2.Init(kDoublePref, &prefs); - - pref1.SetValue(2.3); - EXPECT_EQ(2.3, *pref2); - - pref2.SetValue(3.5); - EXPECT_EQ(3.5, *pref1); - - prefs.SetDouble(kDoublePref, 4.2); - EXPECT_EQ(4.2, *pref1); - EXPECT_EQ(4.2, *pref2); -} - -TEST(PrefMemberTest, Observer) { - TestingPrefService prefs; - RegisterTestPrefs(&prefs); - - PrefMemberTestClass test_obj(&prefs); - EXPECT_EQ("default", *test_obj.str_); - - // Calling SetValue should not fire the observer. - test_obj.str_.SetValue("hello"); - EXPECT_EQ(0, test_obj.observe_cnt_); - EXPECT_EQ("hello", prefs.GetString(kStringPref)); - - // Changing the pref does fire the observer. - prefs.SetString(kStringPref, "world"); - EXPECT_EQ(1, test_obj.observe_cnt_); - EXPECT_EQ("world", *(test_obj.str_)); - - // Not changing the value should not fire the observer. - prefs.SetString(kStringPref, "world"); - EXPECT_EQ(1, test_obj.observe_cnt_); - EXPECT_EQ("world", *(test_obj.str_)); - - prefs.SetString(kStringPref, "hello"); - EXPECT_EQ(2, test_obj.observe_cnt_); - EXPECT_EQ("hello", prefs.GetString(kStringPref)); -} - -TEST(PrefMemberTest, NoInit) { - // Make sure not calling Init on a PrefMember doesn't cause problems. - IntegerPrefMember pref; -} - -TEST(PrefMemberTest, MoveToThread) { - TestingPrefService prefs; - scoped_refptr<GetPrefValueCallback> callback = - make_scoped_refptr(new GetPrefValueCallback()); - MessageLoop message_loop; - content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); - content::TestBrowserThread io_thread(BrowserThread::IO); - ASSERT_TRUE(io_thread.Start()); - RegisterTestPrefs(&prefs); - callback->Init(kBoolPref, &prefs); - - ASSERT_TRUE(callback->FetchValue()); - EXPECT_FALSE(callback->value()); - - prefs.SetBoolean(kBoolPref, true); - - ASSERT_TRUE(callback->FetchValue()); - EXPECT_TRUE(callback->value()); - - callback->Destroy(); - - ASSERT_TRUE(callback->FetchValue()); - EXPECT_TRUE(callback->value()); -} diff --git a/chrome/browser/autofill/autocomplete_history_manager.h b/chrome/browser/autofill/autocomplete_history_manager.h index 85c593a..3f7de2e 100644 --- a/chrome/browser/autofill/autocomplete_history_manager.h +++ b/chrome/browser/autofill/autocomplete_history_manager.h @@ -8,7 +8,7 @@ #include <vector> #include "base/gtest_prod_util.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/api/webdata/autofill_web_data_service.h" #include "chrome/browser/api/webdata/web_data_service_consumer.h" #include "content/public/browser/web_contents_observer.h" diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc index f21e2ae..fc578d4 100644 --- a/chrome/browser/browsing_data/browsing_data_remover.cc +++ b/chrome/browser/browsing_data/browsing_data_remover.cc @@ -13,7 +13,7 @@ #include "base/file_util.h" #include "base/logging.h" #include "base/platform_file.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/autofill/personal_data_manager.h" #include "chrome/browser/autofill/personal_data_manager_factory.h" #include "chrome/browser/browser_process.h" diff --git a/chrome/browser/browsing_data/browsing_data_remover.h b/chrome/browser/browsing_data/browsing_data_remover.h index ffd876e..7222237 100644 --- a/chrome/browser/browsing_data/browsing_data_remover.h +++ b/chrome/browser/browsing_data/browsing_data_remover.h @@ -10,10 +10,10 @@ #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" #include "base/observer_list.h" +#include "base/prefs/public/pref_member.h" #include "base/sequenced_task_runner_helpers.h" #include "base/synchronization/waitable_event_watcher.h" #include "base/time.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/pepper_flash_settings_manager.h" #include "chrome/common/cancelable_task_tracker.h" #include "content/public/browser/dom_storage_context.h" diff --git a/chrome/browser/captive_portal/captive_portal_service.h b/chrome/browser/captive_portal/captive_portal_service.h index 24d454f..6bd1713 100644 --- a/chrome/browser/captive_portal/captive_portal_service.h +++ b/chrome/browser/captive_portal/captive_portal_service.h @@ -7,10 +7,10 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +#include "base/prefs/public/pref_member.h" #include "base/threading/non_thread_safe.h" #include "base/time.h" #include "base/timer.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/captive_portal/captive_portal_detector.h" #include "chrome/browser/profiles/profile_keyed_service.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/chromeos/accessibility/magnification_manager.cc b/chrome/browser/chromeos/accessibility/magnification_manager.cc index 01cfc01..e59e7b2 100644 --- a/chrome/browser/chromeos/accessibility/magnification_manager.cc +++ b/chrome/browser/chromeos/accessibility/magnification_manager.cc @@ -10,7 +10,7 @@ #include "ash/system/tray/system_tray_notifier.h" #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/chromeos/input_method/browser_state_monitor.h b/chrome/browser/chromeos/input_method/browser_state_monitor.h index e74f8ca..bc3e73a 100644 --- a/chrome/browser/chromeos/input_method/browser_state_monitor.h +++ b/chrome/browser/chromeos/input_method/browser_state_monitor.h @@ -9,6 +9,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/chromeos/input_method/input_method_manager.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" diff --git a/chrome/browser/chromeos/input_method/browser_state_monitor_unittest.cc b/chrome/browser/chromeos/input_method/browser_state_monitor_unittest.cc index f439923..746009c 100644 --- a/chrome/browser/chromeos/input_method/browser_state_monitor_unittest.cc +++ b/chrome/browser/chromeos/input_method/browser_state_monitor_unittest.cc @@ -7,6 +7,7 @@ #include <string> #include "base/basictypes.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/chromeos/input_method/mock_input_method_delegate.h" #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" #include "chrome/common/chrome_notification_types.h" diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc index fd329e7..ecd0c92 100644 --- a/chrome/browser/chromeos/login/login_utils.cc +++ b/chrome/browser/chromeos/login/login_utils.cc @@ -18,6 +18,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" #include "base/path_service.h" +#include "base/prefs/public/pref_member.h" #include "base/string_util.h" #include "base/stringprintf.h" #include "base/synchronization/lock.h" @@ -25,7 +26,6 @@ #include "base/time.h" #include "base/utf_string_conversions.h" #include "cc/switches.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_shutdown.h" #include "chrome/browser/chromeos/boot_times_loader.h" diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc index 9428fd4..af941d5 100644 --- a/chrome/browser/chromeos/preferences.cc +++ b/chrome/browser/chromeos/preferences.cc @@ -8,10 +8,10 @@ #include "base/command_line.h" #include "base/i18n/time_formatting.h" #include "base/metrics/histogram.h" +#include "base/prefs/public/pref_member.h" #include "base/string_split.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/drive/drive_file_system_util.h" #include "chrome/browser/chromeos/input_method/input_method_configuration.h" diff --git a/chrome/browser/chromeos/preferences.h b/chrome/browser/chromeos/preferences.h index dcee14c..6eebc67 100644 --- a/chrome/browser/chromeos/preferences.h +++ b/chrome/browser/chromeos/preferences.h @@ -9,7 +9,7 @@ #include <vector> #include "base/compiler_specific.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/chromeos/language_preferences.h" class PrefService; diff --git a/chrome/browser/chromeos/preferences_unittest.cc b/chrome/browser/chromeos/preferences_unittest.cc index 9304954..69e3621 100644 --- a/chrome/browser/chromeos/preferences_unittest.cc +++ b/chrome/browser/chromeos/preferences_unittest.cc @@ -4,7 +4,7 @@ #include "chrome/browser/chromeos/preferences.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" #include "chrome/browser/download/download_prefs.h" #include "chrome/common/pref_names.h" diff --git a/chrome/browser/chromeos/proxy_config_service_impl.h b/chrome/browser/chromeos/proxy_config_service_impl.h index 2cf46a3..b2a3b7b 100644 --- a/chrome/browser/chromeos/proxy_config_service_impl.h +++ b/chrome/browser/chromeos/proxy_config_service_impl.h @@ -9,8 +9,8 @@ #include <vector> #include "base/basictypes.h" +#include "base/prefs/public/pref_member.h" #include "base/values.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/chromeos/cros/network_library.h" #include "chrome/browser/net/pref_proxy_config_tracker_impl.h" diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc index 612784a..dec52fc 100644 --- a/chrome/browser/download/chrome_download_manager_delegate.cc +++ b/chrome/browser/download/chrome_download_manager_delegate.cc @@ -10,11 +10,11 @@ #include "base/bind_helpers.h" #include "base/callback.h" #include "base/file_util.h" +#include "base/prefs/public/pref_member.h" #include "base/rand_util.h" #include "base/stringprintf.h" #include "base/time.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/download/download_completion_blocker.h" #include "chrome/browser/download/download_crx_util.h" diff --git a/chrome/browser/download/download_prefs.h b/chrome/browser/download/download_prefs.h index 75c16d7..95d581d 100644 --- a/chrome/browser/download/download_prefs.h +++ b/chrome/browser/download/download_prefs.h @@ -8,7 +8,7 @@ #include <set> #include "base/file_path.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" class Profile; diff --git a/chrome/browser/download/save_package_file_picker.cc b/chrome/browser/download/save_package_file_picker.cc index fd6d538..a3b2640 100644 --- a/chrome/browser/download/save_package_file_picker.cc +++ b/chrome/browser/download/save_package_file_picker.cc @@ -6,8 +6,8 @@ #include "base/command_line.h" #include "base/metrics/histogram.h" +#include "base/prefs/public/pref_member.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/download/chrome_download_manager_delegate.h" #include "chrome/browser/download/download_prefs.h" #include "chrome/browser/platform_util.h" diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc index 723dd4e..2c635f3 100644 --- a/chrome/browser/download/save_page_browsertest.cc +++ b/chrome/browser/download/save_page_browsertest.cc @@ -9,9 +9,9 @@ #include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/path_service.h" +#include "base/prefs/public/pref_member.h" #include "base/test/test_file_util.h" #include "chrome/app/chrome_command_ids.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/download/chrome_download_manager_delegate.h" #include "chrome/browser/download/download_history.h" #include "chrome/browser/download/download_prefs.h" diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc index 035177b..8ce1d29 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc +++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc @@ -14,12 +14,12 @@ #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/path_service.h" +#include "base/prefs/public/pref_member.h" #include "base/stl_util.h" #include "base/string_piece.h" #include "base/stringprintf.h" #include "base/time.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/content_settings/cookie_settings.h" #include "chrome/browser/extensions/api/web_request/upload_data_presenter.h" #include "chrome/browser/extensions/api/web_request/web_request_api.h" diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h index 8216614..fb7921a 100644 --- a/chrome/browser/io_thread.h +++ b/chrome/browser/io_thread.h @@ -12,7 +12,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/net/ssl_config_service_manager.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread_delegate.h" diff --git a/chrome/browser/net/chrome_http_user_agent_settings.h b/chrome/browser/net/chrome_http_user_agent_settings.h index a7d390f..a7f3227 100644 --- a/chrome/browser/net/chrome_http_user_agent_settings.h +++ b/chrome/browser/net/chrome_http_user_agent_settings.h @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "net/url_request/http_user_agent_settings.h" class PrefService; diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc index 5406489..a352093 100644 --- a/chrome/browser/net/chrome_network_delegate.cc +++ b/chrome/browser/net/chrome_network_delegate.cc @@ -10,9 +10,9 @@ #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/path_service.h" +#include "base/prefs/public/pref_member.h" #include "base/string_number_conversions.h" #include "base/string_split.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings.h" #include "chrome/browser/content_settings/tab_specific_content_settings.h" diff --git a/chrome/browser/net/chrome_network_delegate_unittest.cc b/chrome/browser/net/chrome_network_delegate_unittest.cc index c5889ae..20c0466 100644 --- a/chrome/browser/net/chrome_network_delegate_unittest.cc +++ b/chrome/browser/net/chrome_network_delegate_unittest.cc @@ -7,7 +7,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/extensions/event_router_forwarder.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" diff --git a/chrome/browser/net/net_error_tab_helper.h b/chrome/browser/net/net_error_tab_helper.h index 2a4c905..bbe3f7f 100644 --- a/chrome/browser/net/net_error_tab_helper.h +++ b/chrome/browser/net/net_error_tab_helper.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/net/dns_probe_service.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" diff --git a/chrome/browser/net/net_pref_observer.h b/chrome/browser/net/net_pref_observer.h index 14e6b14..f7dab1d 100644 --- a/chrome/browser/net/net_pref_observer.h +++ b/chrome/browser/net/net_pref_observer.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_ #include "base/basictypes.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" namespace chrome_browser_net { class Predictor; diff --git a/chrome/browser/net/ssl_config_service_manager_pref.cc b/chrome/browser/net/ssl_config_service_manager_pref.cc index 411c879..ff86906 100644 --- a/chrome/browser/net/ssl_config_service_manager_pref.cc +++ b/chrome/browser/net/ssl_config_service_manager_pref.cc @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "base/bind.h" #include "base/prefs/public/pref_change_registrar.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/content_settings/content_settings_utils.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/common/chrome_notification_types.h" diff --git a/chrome/browser/notifications/notification_ui_manager_impl.h b/chrome/browser/notifications/notification_ui_manager_impl.h index 0b567e6..e22c4c5 100644 --- a/chrome/browser/notifications/notification_ui_manager_impl.h +++ b/chrome/browser/notifications/notification_ui_manager_impl.h @@ -11,8 +11,8 @@ #include "base/id_map.h" #include "base/memory/scoped_ptr.h" +#include "base/prefs/public/pref_member.h" #include "base/timer.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/notifications/balloon.h" #include "chrome/browser/notifications/balloon_collection.h" #include "chrome/browser/notifications/notification_prefs_manager.h" diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h index ffc770e..1e5a9f0 100644 --- a/chrome/browser/password_manager/password_manager.h +++ b/chrome/browser/password_manager/password_manager.h @@ -9,8 +9,8 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" +#include "base/prefs/public/pref_member.h" #include "base/stl_util.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/password_manager/password_form_manager.h" #include "chrome/browser/ui/login/login_model.h" #include "chrome/common/password_form_fill_data.h" diff --git a/chrome/browser/plugins/plugin_status_pref_setter.h b/chrome/browser/plugins/plugin_status_pref_setter.h index 3496f6e5..6242170 100644 --- a/chrome/browser/plugins/plugin_status_pref_setter.h +++ b/chrome/browser/plugins/plugin_status_pref_setter.h @@ -9,7 +9,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" diff --git a/chrome/browser/policy/cloud_policy_core.h b/chrome/browser/policy/cloud_policy_core.h index 536691b..3b22827 100644 --- a/chrome/browser/policy/cloud_policy_core.h +++ b/chrome/browser/policy/cloud_policy_core.h @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" class PrefService; diff --git a/chrome/browser/policy/cloud_policy_manager.h b/chrome/browser/policy/cloud_policy_manager.h index 50b29357..32941e2 100644 --- a/chrome/browser/policy/cloud_policy_manager.h +++ b/chrome/browser/policy/cloud_policy_manager.h @@ -9,6 +9,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/policy/cloud_policy_core.h" #include "chrome/browser/policy/cloud_policy_store.h" #include "chrome/browser/policy/configuration_policy_provider.h" diff --git a/chrome/browser/prefs/pref_notifier_impl.h b/chrome/browser/prefs/pref_notifier_impl.h index 34c225f..7ec092d 100644 --- a/chrome/browser/prefs/pref_notifier_impl.h +++ b/chrome/browser/prefs/pref_notifier_impl.h @@ -12,7 +12,7 @@ #include "base/hash_tables.h" #include "base/observer_list.h" #include "base/prefs/pref_notifier.h" -#include "base/prefs/public/pref_observer.h" +#include "base/prefs/pref_observer.h" #include "base/threading/non_thread_safe.h" class PrefService; diff --git a/chrome/browser/prefs/pref_notifier_impl_unittest.cc b/chrome/browser/prefs/pref_notifier_impl_unittest.cc index 8460dc7..7570aef 100644 --- a/chrome/browser/prefs/pref_notifier_impl_unittest.cc +++ b/chrome/browser/prefs/pref_notifier_impl_unittest.cc @@ -4,7 +4,7 @@ #include "base/bind.h" #include "base/callback.h" -#include "base/prefs/public/pref_observer.h" +#include "base/prefs/pref_observer.h" #include "chrome/browser/prefs/mock_pref_change_callback.h" #include "chrome/browser/prefs/pref_notifier_impl.h" #include "chrome/browser/prefs/pref_service.h" diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h index e23eaab..b3b56ee 100644 --- a/chrome/browser/printing/print_view_manager.h +++ b/chrome/browser/printing/print_view_manager.h @@ -6,8 +6,8 @@ #define CHROME_BROWSER_PRINTING_PRINT_VIEW_MANAGER_H_ #include "base/memory/ref_counted.h" +#include "base/prefs/public/pref_member.h" #include "base/string16.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_contents_observer.h" diff --git a/chrome/browser/profiles/gaia_info_update_service.h b/chrome/browser/profiles/gaia_info_update_service.h index 8085b77..d8d70f8 100644 --- a/chrome/browser/profiles/gaia_info_update_service.h +++ b/chrome/browser/profiles/gaia_info_update_service.h @@ -8,8 +8,8 @@ #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" +#include "base/prefs/public/pref_member.h" #include "base/timer.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/profiles/profile_downloader.h" #include "chrome/browser/profiles/profile_downloader_delegate.h" diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc index 568274e..edda406 100644 --- a/chrome/browser/profiles/profile_impl_io_data.cc +++ b/chrome/browser/profiles/profile_impl_io_data.cc @@ -8,9 +8,9 @@ #include "base/command_line.h" #include "base/file_util.h" #include "base/logging.h" +#include "base/prefs/public/pref_member.h" #include "base/stl_util.h" #include "base/threading/worker_pool.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/custom_handlers/protocol_handler_registry.h" #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" #include "chrome/browser/io_thread.h" diff --git a/chrome/browser/profiles/profile_io_data.h b/chrome/browser/profiles/profile_io_data.h index 0fa35ba..ef91f6a 100644 --- a/chrome/browser/profiles/profile_io_data.h +++ b/chrome/browser/profiles/profile_io_data.h @@ -13,8 +13,8 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" +#include "base/prefs/public/pref_member.h" #include "base/synchronization/lock.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/io_thread.h" #include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/profiles/storage_partition_descriptor.h" diff --git a/chrome/browser/renderer_host/plugin_info_message_filter.h b/chrome/browser/renderer_host/plugin_info_message_filter.h index a780421..7b95342 100644 --- a/chrome/browser/renderer_host/plugin_info_message_filter.h +++ b/chrome/browser/renderer_host/plugin_info_message_filter.h @@ -10,8 +10,8 @@ #include "base/compiler_specific.h" #include "base/memory/weak_ptr.h" +#include "base/prefs/public/pref_member.h" #include "base/sequenced_task_runner_helpers.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/common/content_settings.h" #include "content/public/browser/browser_message_filter.h" diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc index ab7cd05..ca2a3dc 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc @@ -5,14 +5,14 @@ #include "chrome/browser/spellchecker/spellcheck_service.h" #include "base/platform_file.h" +#include "base/prefs/public/pref_member.h" #include "base/string_split.h" #include "base/synchronization/waitable_event.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/spellchecker/spellcheck_factory.h" #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" #include "chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h" -#include "chrome/browser/spellchecker/spellcheck_factory.h" #include "chrome/browser/spellchecker/spellcheck_platform_mac.h" #include "chrome/common/pref_names.h" #include "chrome/common/spellcheck_messages.h" diff --git a/chrome/browser/sync/sync_prefs.h b/chrome/browser/sync/sync_prefs.h index 84c30cb..bd41e9c 100644 --- a/chrome/browser/sync/sync_prefs.h +++ b/chrome/browser/sync/sync_prefs.h @@ -9,9 +9,9 @@ #include "base/compiler_specific.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" +#include "base/prefs/public/pref_member.h" #include "base/threading/non_thread_safe.h" #include "base/time.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "sync/internal_api/public/base/model_type.h" #include "sync/notifier/invalidation_state_tracker.h" diff --git a/chrome/browser/sync/test/integration/sync_errors_test.cc b/chrome/browser/sync/test/integration/sync_errors_test.cc index caac71e..53c7395 100644 --- a/chrome/browser/sync/test/integration/sync_errors_test.cc +++ b/chrome/browser/sync/test/integration/sync_errors_test.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/sync/profile_sync_service_harness.h" diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index de26622..3a98bec 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -11,12 +11,12 @@ #include "base/command_line.h" #include "base/logging.h" #include "base/metrics/histogram.h" +#include "base/prefs/public/pref_member.h" #include "base/stl_util.h" #include "base/string_util.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "chrome/app/chrome_command_ids.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/autocomplete/autocomplete_classifier.h" #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" #include "chrome/browser/autocomplete/autocomplete_match.h" @@ -40,8 +40,8 @@ #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/speech/chrome_speech_recognition_preferences.h" -#include "chrome/browser/spellchecker/spellcheck_service.h" #include "chrome/browser/spellchecker/spellcheck_host_metrics.h" +#include "chrome/browser/spellchecker/spellcheck_service.h" #include "chrome/browser/tab_contents/retargeting_details.h" #include "chrome/browser/tab_contents/spellchecker_submenu_observer.h" #include "chrome/browser/tab_contents/spelling_menu_observer.h" diff --git a/chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc b/chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc index a4be51f..3b9c99e 100644 --- a/chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc +++ b/chrome/browser/tab_contents/spellchecker_submenu_observer_hunspell.cc @@ -5,8 +5,8 @@ #include "chrome/browser/tab_contents/spellchecker_submenu_observer.h" #include "base/logging.h" +#include "base/prefs/public/pref_member.h" #include "chrome/app/chrome_command_ids.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/spellchecker/spellcheck_service.h" diff --git a/chrome/browser/tab_contents/spelling_menu_observer.h b/chrome/browser/tab_contents/spelling_menu_observer.h index 6ae1957..26abedb 100644 --- a/chrome/browser/tab_contents/spelling_menu_observer.h +++ b/chrome/browser/tab_contents/spelling_menu_observer.h @@ -9,9 +9,9 @@ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" +#include "base/prefs/public/pref_member.h" #include "base/string16.h" #include "base/timer.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/tab_contents/render_view_context_menu_observer.h" class RenderViewContextMenuProxy; diff --git a/chrome/browser/ui/ash/event_rewriter_unittest.cc b/chrome/browser/ui/ash/event_rewriter_unittest.cc index 2440cb8..f5697a4 100644 --- a/chrome/browser/ui/ash/event_rewriter_unittest.cc +++ b/chrome/browser/ui/ash/event_rewriter_unittest.cc @@ -6,10 +6,10 @@ #include "base/basictypes.h" #include "base/command_line.h" +#include "base/prefs/public/pref_member.h" #include "base/stringprintf.h" -#include "chrome/browser/api/prefs/pref_member.h" -#include "chrome/common/pref_names.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/pref_names.h" #include "chrome/test/base/testing_pref_service.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/events/event.h" diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h index 0a9aff8..9fef239 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -16,8 +16,8 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/prefs/public/pref_change_registrar.h" +#include "base/prefs/public/pref_member.h" #include "base/string16.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/debugger/devtools_toggle_action.h" #include "chrome/browser/event_disposition.h" #include "chrome/browser/sessions/session_id.h" diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h index 3032241..07141150 100644 --- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h +++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h @@ -13,7 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/extensions/image_loading_tracker.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.h b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.h index 382c52d..694b9d8 100644 --- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.h +++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.h @@ -9,7 +9,7 @@ #include "base/memory/scoped_nsobject.h" #include "base/memory/scoped_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #import "chrome/browser/ui/cocoa/command_observer_bridge.h" #import "chrome/browser/ui/cocoa/tracking_area.h" #import "chrome/browser/ui/cocoa/url_drop_target.h" diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h index a7a6888..7f23bfc 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h @@ -13,7 +13,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/bookmarks/bookmark_model_observer.h" #include "chrome/browser/ui/bookmarks/bookmark_bar.h" #include "chrome/browser/ui/bookmarks/bookmark_bar_instructions_delegate.h" diff --git a/chrome/browser/ui/gtk/browser_titlebar.h b/chrome/browser/ui/gtk/browser_titlebar.h index 36995fd..fecf602 100644 --- a/chrome/browser/ui/gtk/browser_titlebar.h +++ b/chrome/browser/ui/gtk/browser_titlebar.h @@ -14,7 +14,7 @@ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/ui/gtk/titlebar_throb_animation.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.h b/chrome/browser/ui/gtk/browser_toolbar_gtk.h index ebd67c0..932d142 100644 --- a/chrome/browser/ui/gtk/browser_toolbar_gtk.h +++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.h @@ -10,7 +10,7 @@ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/command_observer.h" #include "chrome/browser/ui/gtk/custom_button.h" #include "chrome/browser/ui/gtk/menu_gtk.h" diff --git a/chrome/browser/ui/gtk/browser_window_gtk.h b/chrome/browser/ui/gtk/browser_window_gtk.h index 27551ec..5203eed 100644 --- a/chrome/browser/ui/gtk/browser_window_gtk.h +++ b/chrome/browser/ui/gtk/browser_window_gtk.h @@ -12,9 +12,9 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" +#include "base/prefs/public/pref_member.h" #include "base/timer.h" #include "build/build_config.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/debugger/devtools_window.h" #include "chrome/browser/extensions/extension_keybinding_registry.h" #include "chrome/browser/infobars/infobar_container.h" diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h index 0bde97e..0a2443d 100644 --- a/chrome/browser/ui/gtk/location_bar_view_gtk.h +++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h @@ -16,7 +16,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/extensions/extension_action.h" #include "chrome/browser/extensions/extension_action_icon_factory.h" #include "chrome/browser/extensions/extension_context_menu_model.h" diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h index 557e167..a42bbd0 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.h +++ b/chrome/browser/ui/views/location_bar/location_bar_view.h @@ -9,7 +9,7 @@ #include <vector> #include "base/compiler_specific.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/extensions/extension_context_menu_model.h" #include "chrome/browser/search_engines/template_url_service_observer.h" #include "chrome/browser/ui/omnibox/location_bar.h" diff --git a/chrome/browser/ui/views/toolbar_view.h b/chrome/browser/ui/views/toolbar_view.h index 43dec8b..3010a39 100644 --- a/chrome/browser/ui/views/toolbar_view.h +++ b/chrome/browser/ui/views/toolbar_view.h @@ -10,7 +10,7 @@ #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/command_observer.h" #include "chrome/browser/ui/toolbar/back_forward_menu_model.h" #include "chrome/browser/ui/views/location_bar/location_bar_view.h" diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc index aee7199..6c85194 100644 --- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc +++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc @@ -19,6 +19,7 @@ #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/platform_file.h" +#include "base/prefs/public/pref_member.h" #include "base/sequenced_task_runner_helpers.h" #include "base/string_number_conversions.h" #include "base/string_piece.h" @@ -27,7 +28,6 @@ #include "base/threading/worker_pool.h" #include "base/utf_string_conversions.h" #include "base/values.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browsing_data/browsing_data_helper.h" #include "chrome/browser/browsing_data/browsing_data_remover.h" diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.h b/chrome/browser/ui/webui/ntp/ntp_login_handler.h index 331caf9e..c7e953e 100644 --- a/chrome/browser/ui/webui/ntp/ntp_login_handler.h +++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_ #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_ -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_ui_message_handler.h" diff --git a/chrome/browser/ui/webui/options/browser_options_handler.h b/chrome/browser/ui/webui/options/browser_options_handler.h index 794bc92..fafba37 100644 --- a/chrome/browser/ui/webui/options/browser_options_handler.h +++ b/chrome/browser/ui/webui/options/browser_options_handler.h @@ -8,7 +8,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/api/sync/profile_sync_service_observer.h" #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.h b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.h index 10d3a51..fcf6b2b 100644 --- a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.h +++ b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_KEYBOARD_HANDLER_H_ #include "base/compiler_specific.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/ui/webui/options/options_ui.h" namespace chromeos { diff --git a/chrome/browser/ui/webui/options/chromeos/pointer_handler.h b/chrome/browser/ui/webui/options/chromeos/pointer_handler.h index 884f419..5360dce 100644 --- a/chrome/browser/ui/webui/options/chromeos/pointer_handler.h +++ b/chrome/browser/ui/webui/options/chromeos/pointer_handler.h @@ -7,9 +7,9 @@ #include "base/compiler_specific.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" -#include "chrome/browser/ui/webui/options/options_ui.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/chromeos/system/pointer_device_observer.h" +#include "chrome/browser/ui/webui/options/options_ui.h" namespace chromeos { namespace options { diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.h b/chrome/browser/ui/webui/options/clear_browser_data_handler.h index a3366b7..d8da075 100644 --- a/chrome/browser/ui/webui/options/clear_browser_data_handler.h +++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CLEAR_BROWSER_DATA_HANDLER_H_ -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/browsing_data/browsing_data_remover.h" #include "chrome/browser/ui/webui/options/options_ui.h" diff --git a/chrome/browser/ui/webui/options/font_settings_handler.h b/chrome/browser/ui/webui/options/font_settings_handler.h index 07c7fdc..67b5e04 100644 --- a/chrome/browser/ui/webui/options/font_settings_handler.h +++ b/chrome/browser/ui/webui/options/font_settings_handler.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_ #include "base/memory/scoped_ptr.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/ui/webui/options/options_ui.h" namespace base { diff --git a/chrome/browser/ui/webui/options/password_manager_handler.h b/chrome/browser/ui/webui/options/password_manager_handler.h index eaa9767..c47058a 100644 --- a/chrome/browser/ui/webui/options/password_manager_handler.h +++ b/chrome/browser/ui/webui/options/password_manager_handler.h @@ -9,7 +9,7 @@ #include <vector> #include "base/memory/scoped_vector.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/password_manager/password_store.h" #include "chrome/browser/password_manager/password_store_consumer.h" #include "chrome/browser/ui/webui/options/options_ui.h" diff --git a/chrome/browser/ui/webui/options/startup_pages_handler.h b/chrome/browser/ui/webui/options/startup_pages_handler.h index 557417dd..f6b718e 100644 --- a/chrome/browser/ui/webui/options/startup_pages_handler.h +++ b/chrome/browser/ui/webui/options/startup_pages_handler.h @@ -9,7 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/prefs/public/pref_change_registrar.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" #include "chrome/browser/ui/webui/options/options_ui.h" #include "ui/base/models/table_model_observer.h" diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc index fcc7486..059d1a5 100644 --- a/chrome/browser/ui/webui/plugins_ui.cc +++ b/chrome/browser/ui/webui/plugins_ui.cc @@ -16,9 +16,9 @@ #include "base/memory/weak_ptr.h" #include "base/message_loop.h" #include "base/path_service.h" +#include "base/prefs/public/pref_member.h" #include "base/utf_string_conversions.h" #include "base/values.h" -#include "chrome/browser/api/prefs/pref_member.h" #include "chrome/browser/content_settings/host_content_settings_map.h" #include "chrome/browser/plugins/plugin_finder.h" #include "chrome/browser/plugins/plugin_metadata.h" diff --git a/chrome/browser/ui/zoom/zoom_controller.h b/chrome/browser/ui/zoom/zoom_controller.h index 219c824..ccddb92 100644 --- a/chrome/browser/ui/zoom/zoom_controller.h +++ b/chrome/browser/ui/zoom/zoom_controller.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" -#include "chrome/browser/api/prefs/pref_member.h" +#include "base/prefs/public/pref_member.h" #include "chrome/browser/ui/zoom/zoom_observer.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" |