Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Side by Side Diff: components/user_prefs/user_prefs.cc

Issue 12340111: Introduce //components/user_prefs, use to eliminate c/b/prefs dependency in Autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/user_prefs/user_prefs.h"
6
7 #include "base/logging.h"
8 #include "base/memory/singleton.h"
9
10 namespace components {
11
12 // static
13 UserPrefs* UserPrefs::GetInstance() {
14 return Singleton<UserPrefs>::get();
15 }
16
17 void UserPrefs::Initialize(scoped_ptr<UserPrefsDelegate> delegate) {
18 DCHECK(!delegate_.get());
19 delegate_ = delegate.Pass();
20 }
21
22 PrefService* UserPrefs::Lookup(content::BrowserContext* context) {
23 return delegate_->PrefServiceFromBrowserContext(context);
24 }
25
26 } // namespace components
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698