diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 12:05:27 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-01 12:05:27 +0000 |
commit | f59f33e86bac268369be9875d13199ff36bc192b (patch) | |
tree | 1b8de818fc6b07c1c86111c6632d5afea6b4a539 /base/prefs | |
parent | f1d29c0cd064f9c75f03d189d013591140185d14 (diff) | |
download | chromium_src-f59f33e86bac268369be9875d13199ff36bc192b.zip chromium_src-f59f33e86bac268369be9875d13199ff36bc192b.tar.gz chromium_src-f59f33e86bac268369be9875d13199ff36bc192b.tar.bz2 |
Adding 'base_prefs' target to base/gypi.
BUG=155525
Review URL: https://chromiumcodereview.appspot.com/11336034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/prefs')
-rw-r--r-- | base/prefs/base_prefs_export.h | 29 | ||||
-rw-r--r-- | base/prefs/default_pref_store.h | 3 | ||||
-rw-r--r-- | base/prefs/json_pref_store.h | 6 | ||||
-rw-r--r-- | base/prefs/overlay_user_pref_store.h | 5 | ||||
-rw-r--r-- | base/prefs/persistent_pref_store.h | 3 | ||||
-rw-r--r-- | base/prefs/pref_store.h | 5 | ||||
-rw-r--r-- | base/prefs/pref_value_map.h | 3 | ||||
-rw-r--r-- | base/prefs/public/pref_change_registrar.h | 3 | ||||
-rw-r--r-- | base/prefs/value_map_pref_store.h | 3 |
9 files changed, 49 insertions, 11 deletions
diff --git a/base/prefs/base_prefs_export.h b/base/prefs/base_prefs_export.h new file mode 100644 index 0000000..3d207db --- /dev/null +++ b/base/prefs/base_prefs_export.h @@ -0,0 +1,29 @@ +// 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. + +#ifndef BASE_PREFS_BASE_PREFS_EXPORT_H_ +#define BASE_PREFS_BASE_PREFS_EXPORT_H_ + +#if defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(BASE_PREFS_IMPLEMENTATION) +#define BASE_PREFS_EXPORT __declspec(dllexport) +#else +#define BASE_PREFS_EXPORT __declspec(dllimport) +#endif // defined(BASE_PREFS_IMPLEMENTATION) + +#else // defined(WIN32) +#if defined(BASE_PREFS_IMPLEMENTATION) +#define BASE_PREFS_EXPORT __attribute__((visibility("default"))) +#else +#define BASE_PREFS_EXPORT +#endif +#endif + +#else // defined(COMPONENT_BUILD) +#define BASE_PREFS_EXPORT +#endif + +#endif // BASE_PREFS_BASE_PREFS_EXPORT_H_ diff --git a/base/prefs/default_pref_store.h b/base/prefs/default_pref_store.h index 90d83f0..3226cc2 100644 --- a/base/prefs/default_pref_store.h +++ b/base/prefs/default_pref_store.h @@ -7,12 +7,13 @@ #include <string> +#include "base/prefs/base_prefs_export.h" #include "base/prefs/value_map_pref_store.h" #include "base/values.h" // This PrefStore keeps track of default preference values set when a // preference is registered with the PrefService. -class DefaultPrefStore : public ValueMapPrefStore { +class BASE_PREFS_EXPORT DefaultPrefStore : public ValueMapPrefStore { public: DefaultPrefStore(); diff --git a/base/prefs/json_pref_store.h b/base/prefs/json_pref_store.h index f5e08d5..7a75d4c 100644 --- a/base/prefs/json_pref_store.h +++ b/base/prefs/json_pref_store.h @@ -15,6 +15,7 @@ #include "base/memory/scoped_ptr.h" #include "base/message_loop_proxy.h" #include "base/observer_list.h" +#include "base/prefs/base_prefs_export.h" #include "base/prefs/persistent_pref_store.h" namespace base { @@ -27,8 +28,9 @@ class Value; class FilePath; // A writable PrefStore implementation that is used for user preferences. -class JsonPrefStore : public PersistentPrefStore, - public base::ImportantFileWriter::DataSerializer { +class BASE_PREFS_EXPORT JsonPrefStore + : public PersistentPrefStore, + public base::ImportantFileWriter::DataSerializer { public: // Returns instance of SequencedTaskRunner which guarantees that file // operations on the same file will be executed in sequenced order. diff --git a/base/prefs/overlay_user_pref_store.h b/base/prefs/overlay_user_pref_store.h index 5c33c79..0b105aa 100644 --- a/base/prefs/overlay_user_pref_store.h +++ b/base/prefs/overlay_user_pref_store.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "base/observer_list.h" +#include "base/prefs/base_prefs_export.h" #include "base/prefs/persistent_pref_store.h" #include "base/prefs/pref_value_map.h" @@ -18,8 +19,8 @@ // PrefValueMap. Read operations are first answered by the PrefValueMap. // If the PrefValueMap does not contain a value for the requested key, // the look-up is passed on to an underlying PersistentPrefStore |underlay_|. -class OverlayUserPrefStore : public PersistentPrefStore, - public PrefStore::Observer { +class BASE_PREFS_EXPORT OverlayUserPrefStore : public PersistentPrefStore, + public PrefStore::Observer { public: explicit OverlayUserPrefStore(PersistentPrefStore* underlay); diff --git a/base/prefs/persistent_pref_store.h b/base/prefs/persistent_pref_store.h index 9dd0ff9..7f5b97c 100644 --- a/base/prefs/persistent_pref_store.h +++ b/base/prefs/persistent_pref_store.h @@ -7,12 +7,13 @@ #include <string> +#include "base/prefs/base_prefs_export.h" #include "base/prefs/pref_store.h" // This interface is complementary to the PrefStore interface, declaring // additional functionality that adds support for setting values and persisting // the data to some backing store. -class PersistentPrefStore : public PrefStore { +class BASE_PREFS_EXPORT PersistentPrefStore : public PrefStore { public: // Unique integer code for each type of error so we can report them // distinctly in a histogram. diff --git a/base/prefs/pref_store.h b/base/prefs/pref_store.h index c54fb4e..264c1d4 100644 --- a/base/prefs/pref_store.h +++ b/base/prefs/pref_store.h @@ -9,6 +9,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" +#include "base/prefs/base_prefs_export.h" namespace base { class Value; @@ -21,10 +22,10 @@ class Value; // CommandLinePrefStore, which bridges command line options to preferences and // ConfigurationPolicyPrefStore, which is used for hooking up configuration // policy with the preference subsystem. -class PrefStore : public base::RefCounted<PrefStore> { +class BASE_PREFS_EXPORT PrefStore : public base::RefCounted<PrefStore> { public: // Observer interface for monitoring PrefStore. - class Observer { + class BASE_PREFS_EXPORT Observer { public: // Called when the value for the given |key| in the store changes. virtual void OnPrefValueChanged(const std::string& key) = 0; diff --git a/base/prefs/pref_value_map.h b/base/prefs/pref_value_map.h index 9c846dc..1d79127 100644 --- a/base/prefs/pref_value_map.h +++ b/base/prefs/pref_value_map.h @@ -10,13 +10,14 @@ #include <vector> #include "base/basictypes.h" +#include "base/prefs/base_prefs_export.h" namespace base { class Value; } // A generic string to value map used by the PrefStore implementations. -class PrefValueMap { +class BASE_PREFS_EXPORT PrefValueMap { public: typedef std::map<std::string, base::Value*>::iterator iterator; typedef std::map<std::string, base::Value*>::const_iterator const_iterator; diff --git a/base/prefs/public/pref_change_registrar.h b/base/prefs/public/pref_change_registrar.h index 97743e2..a7e1eab 100644 --- a/base/prefs/public/pref_change_registrar.h +++ b/base/prefs/public/pref_change_registrar.h @@ -9,6 +9,7 @@ #include <string> #include "base/basictypes.h" +#include "base/prefs/base_prefs_export.h" class PrefServiceBase; @@ -20,7 +21,7 @@ class NotificationObserver; // with a PrefStore. Functions much like NotificationRegistrar, but specifically // manages observers of preference changes. When the Registrar is destroyed, // all registered observers are automatically unregistered with the PrefStore. -class PrefChangeRegistrar { +class BASE_PREFS_EXPORT PrefChangeRegistrar { public: PrefChangeRegistrar(); virtual ~PrefChangeRegistrar(); diff --git a/base/prefs/value_map_pref_store.h b/base/prefs/value_map_pref_store.h index 64ff265..b8a34ae 100644 --- a/base/prefs/value_map_pref_store.h +++ b/base/prefs/value_map_pref_store.h @@ -10,12 +10,13 @@ #include "base/basictypes.h" #include "base/observer_list.h" +#include "base/prefs/base_prefs_export.h" #include "base/prefs/pref_store.h" #include "base/prefs/pref_value_map.h" // A basic PrefStore implementation that uses a simple name-value map for // storing the preference values. -class ValueMapPrefStore : public PrefStore { +class BASE_PREFS_EXPORT ValueMapPrefStore : public PrefStore { public: typedef std::map<std::string, base::Value*>::iterator iterator; typedef std::map<std::string, base::Value*>::const_iterator const_iterator; |