OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/api/prefs/pref_member.h" | 5 #include "chrome/browser/api/prefs/pref_member.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/prefs/public/pref_service_base.h" |
8 #include "base/value_conversions.h" | 9 #include "base/value_conversions.h" |
9 #include "chrome/browser/api/prefs/pref_service_base.h" | |
10 #include "chrome/common/chrome_notification_types.h" | 10 #include "chrome/common/chrome_notification_types.h" |
11 | 11 |
12 using content::BrowserThread; | 12 using content::BrowserThread; |
13 | 13 |
14 namespace subtle { | 14 namespace subtle { |
15 | 15 |
16 PrefMemberBase::PrefMemberBase() | 16 PrefMemberBase::PrefMemberBase() |
17 : observer_(NULL), | 17 : observer_(NULL), |
18 prefs_(NULL), | 18 prefs_(NULL), |
19 setting_value_(false) { | 19 setting_value_(false) { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 template <> | 166 template <> |
167 void PrefMember<FilePath>::UpdatePref(const FilePath& value) { | 167 void PrefMember<FilePath>::UpdatePref(const FilePath& value) { |
168 prefs()->SetFilePath(pref_name().c_str(), value); | 168 prefs()->SetFilePath(pref_name().c_str(), value); |
169 } | 169 } |
170 | 170 |
171 template <> | 171 template <> |
172 bool PrefMember<FilePath>::Internal::UpdateValueInternal(const Value& value) | 172 bool PrefMember<FilePath>::Internal::UpdateValueInternal(const Value& value) |
173 const { | 173 const { |
174 return base::GetValueAsFilePath(value, &value_); | 174 return base::GetValueAsFilePath(value, &value_); |
175 } | 175 } |
OLD | NEW |