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

Side by Side Diff: chrome/browser/prefs/pref_model_associator_client.cc

Issue 1326353002: Remove dependency of PrefSyncableService on Profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_model_associator
Patch Set: Move files back to //chrome/browser/prefs & //chrome/test/base Created 5 years, 3 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
OLDNEW
(Empty)
1 // Copyright 2015 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 "chrome/browser/prefs/pref_model_associator_client.h"
6
7 #include "base/logging.h"
8
9 PrefModelAssociatorClient::PrefModelAssociatorClient() {}
10
11 PrefModelAssociatorClient::~PrefModelAssociatorClient() {}
12
13 void PrefModelAssociatorClient::RegisterPreference(
14 const std::string& pref_name,
15 PrefModelAssociatorPreferenceType pref_type) {
16 DCHECK(pref_registry_.find(pref_name) == pref_registry_.end());
17 pref_registry_[pref_name] = pref_type;
18 }
19
20 bool PrefModelAssociatorClient::IsPreferenceMerged(
21 const std::string& pref_name,
22 PrefModelAssociatorPreferenceType* pref_type) {
23 auto iter = pref_registry_.find(pref_name);
24 if (iter == pref_registry_.end())
25 return false;
26 *pref_type = iter->second;
27 return true;
28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698