diff options
author | maruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-15 12:27:03 +0000 |
---|---|---|
committer | maruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-15 12:27:03 +0000 |
commit | 1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf (patch) | |
tree | b78be07dbada3ac0f6d2435558e4a6aaba198ffc /chrome/common | |
parent | ea15e98a9353494df754a11fb49f0e4b8c0d4789 (diff) | |
download | chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.zip chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.tar.gz chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.tar.bz2 |
Large patch set (159 files total) to cleanup the includes.
- Slightly reduce the size of the generated .lib files ~3%.
- Reduce the number of implicit and explicit atl and windows includes. hooray!
- Help incremental build by reducing the number of unnecessary included files.
- Split some template class in two, one base class for the common code and the specialization that inherits from the base class.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/SConscript | 1 | ||||
-rw-r--r-- | chrome/common/chrome_plugin_lib.cc | 6 | ||||
-rw-r--r-- | chrome/common/chrome_plugin_lib.h | 14 | ||||
-rw-r--r-- | chrome/common/common.vcproj | 4 | ||||
-rw-r--r-- | chrome/common/drag_drop_types.cc | 6 | ||||
-rw-r--r-- | chrome/common/drag_drop_types.h | 12 | ||||
-rw-r--r-- | chrome/common/gfx/chrome_font.cc | 25 | ||||
-rw-r--r-- | chrome/common/gfx/chrome_font.h | 30 | ||||
-rw-r--r-- | chrome/common/pref_member.cc | 111 | ||||
-rw-r--r-- | chrome/common/pref_member.h | 140 | ||||
-rw-r--r-- | chrome/common/pref_member_unittest.cc | 1 | ||||
-rw-r--r-- | chrome/common/pref_service.h | 11 |
12 files changed, 239 insertions, 122 deletions
diff --git a/chrome/common/SConscript b/chrome/common/SConscript index 6543cfe..7f17c97 100644 --- a/chrome/common/SConscript +++ b/chrome/common/SConscript @@ -110,6 +110,7 @@ input_files = [ 'notification_service.cc', 'os_exchange_data.cc', 'plugin_messages.cc', + 'pref_member.cc', 'pref_names.cc', 'pref_service.cc', 'process_watcher.cc', diff --git a/chrome/common/chrome_plugin_lib.cc b/chrome/common/chrome_plugin_lib.cc index f1d85eb..cd4e08c 100644 --- a/chrome/common/chrome_plugin_lib.cc +++ b/chrome/common/chrome_plugin_lib.cc @@ -185,6 +185,12 @@ void ChromePluginLib::UnloadAllPlugins() { } } +const CPPluginFuncs& ChromePluginLib::functions() const { + DCHECK(initialized_); + DCHECK(IsPluginThread()); + return plugin_funcs_; +} + ChromePluginLib::ChromePluginLib(const std::wstring& filename) : filename_(filename), module_(0), diff --git a/chrome/common/chrome_plugin_lib.h b/chrome/common/chrome_plugin_lib.h index 287eb1e..b52c63f 100644 --- a/chrome/common/chrome_plugin_lib.h +++ b/chrome/common/chrome_plugin_lib.h @@ -27,8 +27,8 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_COMMON_CHROME_PLUGIN_LIB_H__ -#define CHROME_COMMON_CHROME_PLUGIN_LIB_H__ +#ifndef CHROME_COMMON_CHROME_PLUGIN_LIB_H_ +#define CHROME_COMMON_CHROME_PLUGIN_LIB_H_ #include <hash_map> #include <string> @@ -68,11 +68,7 @@ class ChromePluginLib : public base::RefCounted<ChromePluginLib> { const bool is_loaded() const { return initialized_; } // Get the Plugin's function pointer table. - const CPPluginFuncs& functions() const { - DCHECK(initialized_); - DCHECK(IsPluginThread()); - return plugin_funcs_; - } + const CPPluginFuncs& functions() const; CPID cpid() { return reinterpret_cast<CPID>(this); } @@ -121,7 +117,7 @@ class ChromePluginLib : public base::RefCounted<ChromePluginLib> { typedef int (STDCALL *CP_TestFunc)(void*); CP_TestFunc CP_Test_; - DISALLOW_EVIL_CONSTRUCTORS(ChromePluginLib); + DISALLOW_COPY_AND_ASSIGN(ChromePluginLib); }; -#endif // CHROME_COMMON_CHROME_PLUGIN_LIB_H__ +#endif // CHROME_COMMON_CHROME_PLUGIN_LIB_H_ diff --git a/chrome/common/common.vcproj b/chrome/common/common.vcproj index 5c31f33..3cd2809 100644 --- a/chrome/common/common.vcproj +++ b/chrome/common/common.vcproj @@ -554,6 +554,10 @@ > </File> <File + RelativePath=".\pref_member.cc" + > + </File> + <File RelativePath=".\pref_member.h" > </File> diff --git a/chrome/common/drag_drop_types.cc b/chrome/common/drag_drop_types.cc index 0b83cdf..b3df154 100644 --- a/chrome/common/drag_drop_types.cc +++ b/chrome/common/drag_drop_types.cc @@ -32,7 +32,7 @@ #include <oleidl.h> int DragDropTypes::DropEffectToDragOperation( - DWORD effect) { + uint32 effect) { int drag_operation = DRAG_NONE; if (effect & DROPEFFECT_LINK) drag_operation |= DRAG_LINK; @@ -43,8 +43,8 @@ int DragDropTypes::DropEffectToDragOperation( return drag_operation; } -DWORD DragDropTypes::DragOperationToDropEffect(int drag_operation) { - DWORD drop_effect = DROPEFFECT_NONE; +uint32 DragDropTypes::DragOperationToDropEffect(int drag_operation) { + uint32 drop_effect = DROPEFFECT_NONE; if (drag_operation & DRAG_LINK) drop_effect |= DROPEFFECT_LINK; if (drag_operation & DRAG_COPY) diff --git a/chrome/common/drag_drop_types.h b/chrome/common/drag_drop_types.h index f3a7a6e..1b58f07 100644 --- a/chrome/common/drag_drop_types.h +++ b/chrome/common/drag_drop_types.h @@ -27,10 +27,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_COMMON_DRAG_DROP_TYPES_H__ -#define CHROME_COMMON_DRAG_DROP_TYPES_H__ +#ifndef CHROME_COMMON_DRAG_DROP_TYPES_H_ +#define CHROME_COMMON_DRAG_DROP_TYPES_H_ -#include <windows.h> +#include "base/basictypes.h" class DragDropTypes { public: @@ -41,8 +41,8 @@ class DragDropTypes { DRAG_LINK = 1 << 2 }; - static DWORD DragOperationToDropEffect(int drag_operation); - static int DropEffectToDragOperation(DWORD effect); + static uint32 DragOperationToDropEffect(int drag_operation); + static int DropEffectToDragOperation(uint32 effect); }; -#endif +#endif // CHROME_COMMON_DRAG_DROP_TYPES_H_ diff --git a/chrome/common/gfx/chrome_font.cc b/chrome/common/gfx/chrome_font.cc index 198227e..670eeb2 100644 --- a/chrome/common/gfx/chrome_font.cc +++ b/chrome/common/gfx/chrome_font.cc @@ -26,11 +26,14 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "chrome/common/gfx/chrome_font.h" -#include <algorithm> +#include <windows.h> #include <math.h> +#include <algorithm> + #include "base/logging.h" #include "base/win_util.h" #include "chrome/app/locales/locale_settings.h" @@ -105,6 +108,26 @@ int ChromeFont::FontSize() { return font_size; } +ChromeFont::HFontRef::HFontRef(HFONT hfont, + int height, + int baseline, + int ave_char_width, + int style, + int dlu_base_x) + : hfont_(hfont), + height_(height), + baseline_(baseline), + ave_char_width_(ave_char_width), + style_(style), + dlu_base_x_(dlu_base_x) { + DLOG_ASSERT(hfont); +} + +ChromeFont::HFontRef::~HFontRef() { + DeleteObject(hfont_); +} + + ChromeFont ChromeFont::DeriveFont(int size_delta, int style) const { LOGFONT font_info; GetObject(hfont(), sizeof(LOGFONT), &font_info); diff --git a/chrome/common/gfx/chrome_font.h b/chrome/common/gfx/chrome_font.h index ad0fd8d..e831b6d 100644 --- a/chrome/common/gfx/chrome_font.h +++ b/chrome/common/gfx/chrome_font.h @@ -27,12 +27,17 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef CHROME_COMMON_GFX_CHROME_FONT_H__ -#define CHROME_COMMON_GFX_CHROME_FONT_H__ +#ifndef CHROME_COMMON_GFX_CHROME_FONT_H_ +#define CHROME_COMMON_GFX_CHROME_FONT_H_ + +#include "build/build_config.h" -#include <windows.h> #include <string> +#if defined(OS_WIN) +typedef struct HFONT__* HFONT; +#endif + #include "base/basictypes.h" #include "base/ref_counted.h" @@ -127,19 +132,8 @@ class ChromeFont { int baseline, int ave_char_width, int style, - int dlu_base_x) - : hfont_(hfont), - height_(height), - baseline_(baseline), - ave_char_width_(ave_char_width), - style_(style), - dlu_base_x_(dlu_base_x) { - DLOG_ASSERT(hfont); - } - - ~HFontRef() { - DeleteObject(hfont_); - } + int dlu_base_x); + ~HFontRef(); // Accessors HFONT hfont() const { return hfont_; } @@ -158,7 +152,7 @@ class ChromeFont { // Constants used in converting dialog units to pixels. const int dlu_base_x_; - DISALLOW_EVIL_CONSTRUCTORS(HFontRef); + DISALLOW_COPY_AND_ASSIGN(HFontRef); }; @@ -178,4 +172,4 @@ class ChromeFont { scoped_refptr<HFontRef> font_ref_; }; -#endif // CHROME_COMMON_GFX_CHROME_FONT_H__ +#endif // CHROME_COMMON_GFX_CHROME_FONT_H_ diff --git a/chrome/common/pref_member.cc b/chrome/common/pref_member.cc new file mode 100644 index 0000000..bed95d3 --- /dev/null +++ b/chrome/common/pref_member.cc @@ -0,0 +1,111 @@ +// Copyright 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "chrome/common/pref_member.h" + +#include "base/logging.h" +#include "chrome/common/pref_service.h" + +namespace subtle { + +PrefMemberBase::PrefMemberBase() + : observer_(NULL), + prefs_(NULL), + is_synced_(false), + setting_value_(false) { +} + +PrefMemberBase::~PrefMemberBase() { + if (!pref_name_.empty()) + prefs_->RemovePrefObserver(pref_name_.c_str(), this); +} + + +void PrefMemberBase::Init(const wchar_t* pref_name, PrefService* prefs, + NotificationObserver* observer) { + DCHECK(pref_name); + DCHECK(prefs); + DCHECK(pref_name_.empty()); // Check that Init is only called once. + observer_ = observer; + prefs_ = prefs; + pref_name_ = pref_name; + DCHECK(!pref_name_.empty()); + + // Add ourself as a pref observer so we can keep our local value in sync. + prefs_->AddPrefObserver(pref_name, this); +} + +void PrefMemberBase::Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details) { + DCHECK(!pref_name_.empty()); + DCHECK(NOTIFY_PREF_CHANGED == type); + UpdateValueFromPref(); + is_synced_ = true; + if (!setting_value_ && observer_) + observer_->Observe(type, source, details); +} + +void PrefMemberBase::VerifyValuePrefName() { + DCHECK(!pref_name_.empty()); +} + +} // namespace subtle + +void BooleanPrefMember::UpdateValueFromPref() { + value_ = prefs()->GetBoolean(pref_name().c_str()); +} + +void BooleanPrefMember::UpdatePref(const bool& value) { + prefs()->SetBoolean(pref_name().c_str(), value); +} + +void IntegerPrefMember::UpdateValueFromPref() { + value_ = prefs()->GetInteger(pref_name().c_str()); +} + +void IntegerPrefMember::UpdatePref(const int& value) { + prefs()->SetInteger(pref_name().c_str(), value); +} + +void RealPrefMember::UpdateValueFromPref() { + value_ = prefs()->GetReal(pref_name().c_str()); +} + +void RealPrefMember::UpdatePref(const double& value) { + prefs()->SetReal(pref_name().c_str(), value); +} + +void StringPrefMember::UpdateValueFromPref() { + value_ = prefs()->GetString(pref_name().c_str()); +} + +void StringPrefMember::UpdatePref(const std::wstring& value) { + prefs()->SetString(pref_name().c_str(), value); +} diff --git a/chrome/common/pref_member.h b/chrome/common/pref_member.h index 9e175d2..5525d78 100644 --- a/chrome/common/pref_member.h +++ b/chrome/common/pref_member.h @@ -45,58 +45,70 @@ // An optional observer can be passed into the Init method which can be used to // notify MyClass of changes. -#ifndef CHROME_COMMON_PREF_MEMBER_H__ -#define CHROME_COMMON_PREF_MEMBER_H__ +#ifndef CHROME_COMMON_PREF_MEMBER_H_ +#define CHROME_COMMON_PREF_MEMBER_H_ #include <string> -#include "base/logging.h" #include "chrome/common/notification_service.h" -#include "chrome/common/pref_service.h" + +class PrefService; + +namespace subtle { + +class PrefMemberBase : public NotificationObserver { + protected: + PrefMemberBase(); + virtual ~PrefMemberBase(); + + // See PrefMember<> for description. + void Init(const wchar_t* pref_name, PrefService* prefs, + NotificationObserver* observer); + + // NotificationObserver + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); + + void VerifyValuePrefName(); + + // This methods is used to do the actual sync with pref of the specified type. + virtual void UpdateValueFromPref() = 0; + + const std::wstring& pref_name() const { return pref_name_; } + PrefService* prefs() { return prefs_; } + + protected: + bool is_synced_; + bool setting_value_; + + private: + std::wstring pref_name_; + PrefService* prefs_; + NotificationObserver* observer_; +}; + +} // namespace subtle + template <typename ValueType> -class PrefMember : public NotificationObserver { +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() : observer_(NULL), prefs_(NULL), is_synced_(false), - setting_value_(false) {} + PrefMember() { } + virtual ~PrefMember() { } // Do the actual initialization of the class. |observer| may be null if you // don't want any notifications of changes. void Init(const wchar_t* pref_name, PrefService* prefs, NotificationObserver* observer) { - DCHECK(pref_name); - DCHECK(prefs); - DCHECK(pref_name_.empty()); // Check that Init is only called once. - observer_ = observer; - prefs_ = prefs; - pref_name_ = pref_name; - DCHECK(!pref_name_.empty()); - - // Add ourself as a pref observer so we can keep our local value in sync. - prefs_->AddPrefObserver(pref_name, this); - } - - virtual ~PrefMember() { - if (!pref_name_.empty()) - prefs_->RemovePrefObserver(pref_name_.c_str(), this); - } - - virtual void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details) { - DCHECK(!pref_name_.empty()); - DCHECK(NOTIFY_PREF_CHANGED == type); - UpdateValueFromPref(); - is_synced_ = true; - if (!setting_value_ && observer_) - observer_->Observe(type, source, details); + subtle::PrefMemberBase::Init(pref_name, prefs, observer); } // Retrieve the value of the member variable. ValueType GetValue() { - DCHECK(!pref_name_.empty()); + VerifyValuePrefName(); // We lazily fetch the value from the pref service the first time GetValue // is called. if (!is_synced_) { @@ -113,29 +125,19 @@ class PrefMember : public NotificationObserver { // Set the value of the member variable. void SetValue(const ValueType& value) { - DCHECK(!pref_name_.empty()); + VerifyValuePrefName(); setting_value_ = true; UpdatePref(value); setting_value_ = false; } protected: - // These methods are used to do the actual sync with pref of the specified - // type. - virtual void UpdateValueFromPref() = 0; + // This methods is used to do the actual sync with pref of the specified type. virtual void UpdatePref(const ValueType& value) = 0; - std::wstring pref_name_; - PrefService* prefs_; - // We cache the value of the pref so we don't have to keep walking the pref // tree. ValueType value_; - - private: - NotificationObserver* observer_; - bool is_synced_; - bool setting_value_; }; /////////////////////////////////////////////////////////////////////////////// @@ -147,16 +149,11 @@ class BooleanPrefMember : public PrefMember<bool> { virtual ~BooleanPrefMember() { } protected: - virtual void UpdateValueFromPref() { - value_ = prefs_->GetBoolean(pref_name_.c_str()); - } - - virtual void UpdatePref(const bool& value) { - prefs_->SetBoolean(pref_name_.c_str(), value); - } + virtual void UpdateValueFromPref(); + virtual void UpdatePref(const bool& value); private: - DISALLOW_EVIL_CONSTRUCTORS(BooleanPrefMember); + DISALLOW_COPY_AND_ASSIGN(BooleanPrefMember); }; class IntegerPrefMember : public PrefMember<int> { @@ -165,16 +162,11 @@ class IntegerPrefMember : public PrefMember<int> { virtual ~IntegerPrefMember() { } protected: - virtual void UpdateValueFromPref() { - value_ = prefs_->GetInteger(pref_name_.c_str()); - } - - virtual void UpdatePref(const int& value) { - prefs_->SetInteger(pref_name_.c_str(), value); - } + virtual void UpdateValueFromPref(); + virtual void UpdatePref(const int& value); private: - DISALLOW_EVIL_CONSTRUCTORS(IntegerPrefMember); + DISALLOW_COPY_AND_ASSIGN(IntegerPrefMember); }; class RealPrefMember : public PrefMember<double> { @@ -183,16 +175,11 @@ class RealPrefMember : public PrefMember<double> { virtual ~RealPrefMember() { } protected: - virtual void UpdateValueFromPref() { - value_ = prefs_->GetReal(pref_name_.c_str()); - } - - virtual void UpdatePref(const double& value) { - prefs_->SetReal(pref_name_.c_str(), value); - } + virtual void UpdateValueFromPref(); + virtual void UpdatePref(const double& value); private: - DISALLOW_EVIL_CONSTRUCTORS(RealPrefMember); + DISALLOW_COPY_AND_ASSIGN(RealPrefMember); }; class StringPrefMember : public PrefMember<std::wstring> { @@ -201,16 +188,11 @@ class StringPrefMember : public PrefMember<std::wstring> { virtual ~StringPrefMember() { } protected: - virtual void UpdateValueFromPref() { - value_ = prefs_->GetString(pref_name_.c_str()); - } - - virtual void UpdatePref(const std::wstring& value) { - prefs_->SetString(pref_name_.c_str(), value); - } + virtual void UpdateValueFromPref(); + virtual void UpdatePref(const std::wstring& value); private: - DISALLOW_EVIL_CONSTRUCTORS(StringPrefMember); + DISALLOW_COPY_AND_ASSIGN(StringPrefMember); }; -#endif // CHROME_COMMON_PREF_MEMBER_H__ +#endif // CHROME_COMMON_PREF_MEMBER_H_ diff --git a/chrome/common/pref_member_unittest.cc b/chrome/common/pref_member_unittest.cc index 5a26ece..fc88b70 100644 --- a/chrome/common/pref_member_unittest.cc +++ b/chrome/common/pref_member_unittest.cc @@ -28,6 +28,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "chrome/common/pref_member.h" +#include "chrome/common/pref_service.h" #include "testing/gtest/include/gtest/gtest.h" namespace { diff --git a/chrome/common/pref_service.h b/chrome/common/pref_service.h index fed3cf2..ab87960 100644 --- a/chrome/common/pref_service.h +++ b/chrome/common/pref_service.h @@ -37,14 +37,13 @@ // persistent and transient stores, where any corresponding value in the // transient store overrides the one in the persistent store. -#ifndef CHROME_COMMON_PREF_SERVICE_H__ -#define CHROME_COMMON_PREF_SERVICE_H__ +#ifndef CHROME_COMMON_PREF_SERVICE_H_ +#define CHROME_COMMON_PREF_SERVICE_H_ #include <hash_map> #include <string> #include "base/basictypes.h" -#include "base/logging.h" #include "base/non_thread_safe.h" #include "base/observer_list.h" #include "base/scoped_ptr.h" @@ -96,7 +95,7 @@ class PrefService : public NonThreadSafe { // A reference to the pref service's persistent prefs. DictionaryValue* root_pref_; - DISALLOW_EVIL_CONSTRUCTORS(Preference); + DISALLOW_COPY_AND_ASSIGN(Preference); }; // |pref_filename| is the path to the prefs file we will try to load or save to. @@ -257,7 +256,7 @@ class PrefService : public NonThreadSafe { PrefObserverMap; PrefObserverMap pref_observers_; - DISALLOW_EVIL_CONSTRUCTORS(PrefService); + DISALLOW_COPY_AND_ASSIGN(PrefService); }; -#endif // CHROME_COMMON_PREF_SERVICE_H__ +#endif // CHROME_COMMON_PREF_SERVICE_H_ |