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

Side by Side Diff: chrome/service/service_process_prefs.cc

Issue 10344007: Use worker pool for IO in JsonPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
« no previous file with comments | « chrome/service/service_process_prefs.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/values.h" 7 #include "base/values.h"
8 8
9 ServiceProcessPrefs::ServiceProcessPrefs( 9 ServiceProcessPrefs::ServiceProcessPrefs(
10 const FilePath& pref_filename, 10 const FilePath& pref_filename,
11 base::MessageLoopProxy* file_message_loop_proxy) 11 base::SequencedTaskRunner* blocking_task_runner)
12 : prefs_(new JsonPrefStore(pref_filename, file_message_loop_proxy)) { 12 : prefs_(new JsonPrefStore(pref_filename, blocking_task_runner)) {
13 } 13 }
14 14
15 ServiceProcessPrefs::~ServiceProcessPrefs() {} 15 ServiceProcessPrefs::~ServiceProcessPrefs() {}
16 16
17 void ServiceProcessPrefs::ReadPrefs() { 17 void ServiceProcessPrefs::ReadPrefs() {
18 prefs_->ReadPrefs(); 18 prefs_->ReadPrefs();
19 } 19 }
20 20
21 void ServiceProcessPrefs::WritePrefs() { 21 void ServiceProcessPrefs::WritePrefs() {
22 prefs_->CommitPendingWrite(); 22 prefs_->CommitPendingWrite();
(...skipping 28 matching lines...) Expand all
51 !value->IsType(Value::TYPE_DICTIONARY)) { 51 !value->IsType(Value::TYPE_DICTIONARY)) {
52 return; 52 return;
53 } 53 }
54 54
55 *result = static_cast<const DictionaryValue*>(value); 55 *result = static_cast<const DictionaryValue*>(value);
56 } 56 }
57 57
58 void ServiceProcessPrefs::RemovePref(const std::string& key) { 58 void ServiceProcessPrefs::RemovePref(const std::string& key) {
59 prefs_->RemoveValue(key); 59 prefs_->RemoveValue(key);
60 } 60 }
OLDNEW
« no previous file with comments | « chrome/service/service_process_prefs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698