OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/prefs/pref_member.h" | 5 #include "chrome/browser/prefs/pref_member.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/value_conversions.h" | 9 #include "base/value_conversions.h" |
10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
11 #include "chrome/common/chrome_notification_types.h" | 11 #include "chrome/common/chrome_notification_types.h" |
12 | 12 |
| 13 using content::BrowserThread; |
| 14 |
13 namespace subtle { | 15 namespace subtle { |
14 | 16 |
15 PrefMemberBase::PrefMemberBase() | 17 PrefMemberBase::PrefMemberBase() |
16 : observer_(NULL), | 18 : observer_(NULL), |
17 prefs_(NULL), | 19 prefs_(NULL), |
18 setting_value_(false) { | 20 setting_value_(false) { |
19 } | 21 } |
20 | 22 |
21 PrefMemberBase::~PrefMemberBase() { | 23 PrefMemberBase::~PrefMemberBase() { |
22 Destroy(); | 24 Destroy(); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 template <> | 162 template <> |
161 void PrefMember<FilePath>::UpdatePref(const FilePath& value) { | 163 void PrefMember<FilePath>::UpdatePref(const FilePath& value) { |
162 prefs()->SetFilePath(pref_name().c_str(), value); | 164 prefs()->SetFilePath(pref_name().c_str(), value); |
163 } | 165 } |
164 | 166 |
165 template <> | 167 template <> |
166 bool PrefMember<FilePath>::Internal::UpdateValueInternal(const Value& value) | 168 bool PrefMember<FilePath>::Internal::UpdateValueInternal(const Value& value) |
167 const { | 169 const { |
168 return base::GetValueAsFilePath(value, &value_); | 170 return base::GetValueAsFilePath(value, &value_); |
169 } | 171 } |
OLD | NEW |