diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-08 14:12:50 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-08 14:12:50 +0000 |
commit | 5a64e82151109e69bbf8cb83ee945a9f5e966910 (patch) | |
tree | c564cf5df87fdded77c260c8491c26f8bfbf8a5e /components/user_prefs | |
parent | 3ac6b8fc372273274f2f219af304dde3f4df2ec6 (diff) | |
download | chromium_src-5a64e82151109e69bbf8cb83ee945a9f5e966910.zip chromium_src-5a64e82151109e69bbf8cb83ee945a9f5e966910.tar.gz chromium_src-5a64e82151109e69bbf8cb83ee945a9f5e966910.tar.bz2 |
user_prefs: Fix trivial issues found in UserPrefs API.
- Fix typo: s/tof/to
- Single-argument constructors should be marked explicit.
- Remove unused scoped_ptr.h include from user_prefs.h
- Reorder ctor/dtor implementations in the source file to match with the order
declared in the header file.
BUG=138280
TBR=joi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12638007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186959 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/user_prefs')
-rw-r--r-- | components/user_prefs/user_prefs.cc | 12 | ||||
-rw-r--r-- | components/user_prefs/user_prefs.h | 5 |
2 files changed, 8 insertions, 9 deletions
diff --git a/components/user_prefs/user_prefs.cc b/components/user_prefs/user_prefs.cc index 0c920f0..123d557 100644 --- a/components/user_prefs/user_prefs.cc +++ b/components/user_prefs/user_prefs.cc @@ -20,12 +20,6 @@ void* UserDataKey() { } // namespace -UserPrefs::UserPrefs(PrefService* prefs) : prefs_(prefs) { -} - -UserPrefs::~UserPrefs() { -} - // static PrefService* UserPrefs::Get(content::BrowserContext* context) { DCHECK(context); @@ -41,4 +35,10 @@ void UserPrefs::Set(content::BrowserContext* context, PrefService* prefs) { context->SetUserData(UserDataKey(), new UserPrefs(prefs)); } +UserPrefs::UserPrefs(PrefService* prefs) : prefs_(prefs) { +} + +UserPrefs::~UserPrefs() { +} + } // namespace components diff --git a/components/user_prefs/user_prefs.h b/components/user_prefs/user_prefs.h index 1919748..3eec9ff 100644 --- a/components/user_prefs/user_prefs.h +++ b/components/user_prefs/user_prefs.h @@ -6,7 +6,6 @@ #define COMPONENTS_USER_PREFS_USER_PREFS_H_ #include "base/basictypes.h" -#include "base/memory/scoped_ptr.h" #include "base/supports_user_data.h" #include "components/user_prefs/user_prefs_export.h" @@ -22,7 +21,7 @@ namespace components { // hang off of content::BrowserContext and can be retrieved using // UserPrefs::Get(). // -// It is up to the embedder tof create and own the PrefService and +// It is up to the embedder to create and own the PrefService and // attach it to BrowserContext using the UserPrefs::Set() function. class USER_PREFS_EXPORT UserPrefs : public base::SupportsUserData::Data { public: @@ -35,7 +34,7 @@ class USER_PREFS_EXPORT UserPrefs : public base::SupportsUserData::Data { static void Set(content::BrowserContext* context, PrefService* prefs); private: - UserPrefs(PrefService* prefs); + explicit UserPrefs(PrefService* prefs); virtual ~UserPrefs(); // Non-owning; owned by embedder. |