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/service/service_process_prefs.h" | 5 #include "chrome/service/service_process_prefs.h" |
6 | 6 |
7 #include "base/message_loop_proxy.h" | |
Mattias Nissler (ping if slow)
2012/10/22 17:28:21
rather base/sequenced_task_runner.h?
zel
2012/10/24 02:20:11
Done.
| |
7 #include "base/values.h" | 8 #include "base/values.h" |
8 | 9 |
9 ServiceProcessPrefs::ServiceProcessPrefs( | 10 ServiceProcessPrefs::ServiceProcessPrefs( |
10 const FilePath& pref_filename, | 11 const FilePath& pref_filename, |
11 base::MessageLoopProxy* file_message_loop_proxy) | 12 base::SequencedTaskRunner* task_runner) |
12 : prefs_(new JsonPrefStore(pref_filename, file_message_loop_proxy)) { | 13 : prefs_(JsonPrefStore::Create(pref_filename, task_runner)) { |
13 } | 14 } |
14 | 15 |
15 ServiceProcessPrefs::~ServiceProcessPrefs() {} | 16 ServiceProcessPrefs::~ServiceProcessPrefs() {} |
16 | 17 |
17 void ServiceProcessPrefs::ReadPrefs() { | 18 void ServiceProcessPrefs::ReadPrefs() { |
18 prefs_->ReadPrefs(); | 19 prefs_->ReadPrefs(); |
19 } | 20 } |
20 | 21 |
21 void ServiceProcessPrefs::WritePrefs() { | 22 void ServiceProcessPrefs::WritePrefs() { |
22 prefs_->CommitPendingWrite(); | 23 prefs_->CommitPendingWrite(); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
77 } | 78 } |
78 | 79 |
79 void ServiceProcessPrefs::SetValue(const std::string& key, base::Value* value) { | 80 void ServiceProcessPrefs::SetValue(const std::string& key, base::Value* value) { |
80 prefs_->SetValue(key, value); | 81 prefs_->SetValue(key, value); |
81 } | 82 } |
82 | 83 |
83 void ServiceProcessPrefs::RemovePref(const std::string& key) { | 84 void ServiceProcessPrefs::RemovePref(const std::string& key) { |
84 prefs_->RemoveValue(key); | 85 prefs_->RemoveValue(key); |
85 } | 86 } |
86 | 87 |
OLD | NEW |