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

Side by Side Diff: base/prefs/json_pref_store.cc

Issue 369703003: Reduce usage of MessageLoopProxy in base/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 2 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 | « base/observer_list_threadsafe.h ('k') | base/prefs/pref_member.h » ('j') | 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) 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 "base/prefs/json_pref_store.h" 5 #include "base/prefs/json_pref_store.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
13 #include "base/json/json_file_value_serializer.h" 13 #include "base/json/json_file_value_serializer.h"
14 #include "base/json/json_string_value_serializer.h" 14 #include "base/json/json_string_value_serializer.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/metrics/histogram.h" 16 #include "base/metrics/histogram.h"
17 #include "base/prefs/pref_filter.h" 17 #include "base/prefs/pref_filter.h"
18 #include "base/sequenced_task_runner.h" 18 #include "base/sequenced_task_runner.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
20 #include "base/task_runner_util.h" 20 #include "base/task_runner_util.h"
21 #include "base/thread_task_runner_handle.h"
21 #include "base/threading/sequenced_worker_pool.h" 22 #include "base/threading/sequenced_worker_pool.h"
22 #include "base/values.h" 23 #include "base/values.h"
23 24
24 // Result returned from internal read tasks. 25 // Result returned from internal read tasks.
25 struct JsonPrefStore::ReadResult { 26 struct JsonPrefStore::ReadResult {
26 public: 27 public:
27 ReadResult(); 28 ReadResult();
28 ~ReadResult(); 29 ~ReadResult();
29 30
30 scoped_ptr<base::Value> value; 31 scoped_ptr<base::Value> value;
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 437
437 if (error_delegate_ && read_error_ != PREF_READ_ERROR_NONE) 438 if (error_delegate_ && read_error_ != PREF_READ_ERROR_NONE)
438 error_delegate_->OnError(read_error_); 439 error_delegate_->OnError(read_error_);
439 440
440 FOR_EACH_OBSERVER(PrefStore::Observer, 441 FOR_EACH_OBSERVER(PrefStore::Observer,
441 observers_, 442 observers_,
442 OnInitializationCompleted(true)); 443 OnInitializationCompleted(true));
443 444
444 return; 445 return;
445 } 446 }
OLDNEW
« no previous file with comments | « base/observer_list_threadsafe.h ('k') | base/prefs/pref_member.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698