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 "components/filesystem/public/cpp/prefs/filesystem_json_pref_store.h" | 5 #include "components/filesystem/public/cpp/prefs/filesystem_json_pref_store.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
16 #include "base/json/json_string_value_serializer.h" | 16 #include "base/json/json_string_value_serializer.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/prefs/pref_filter.h" | |
21 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
22 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
23 #include "base/task_runner_util.h" | 22 #include "base/task_runner_util.h" |
24 #include "base/time/default_clock.h" | 23 #include "base/time/default_clock.h" |
25 #include "base/values.h" | 24 #include "base/values.h" |
| 25 #include "components/prefs/pref_filter.h" |
26 #include "mojo/common/common_type_converters.h" | 26 #include "mojo/common/common_type_converters.h" |
27 | 27 |
28 namespace filesystem { | 28 namespace filesystem { |
29 | 29 |
30 // Result returned from internal read tasks. | 30 // Result returned from internal read tasks. |
31 struct FilesystemJsonPrefStore::ReadResult { | 31 struct FilesystemJsonPrefStore::ReadResult { |
32 public: | 32 public: |
33 ReadResult(); | 33 ReadResult(); |
34 ~ReadResult(); | 34 ~ReadResult(); |
35 | 35 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 reinterpret_cast<char*>(&contents.front()), contents.size())); | 411 reinterpret_cast<char*>(&contents.front()), contents.size())); |
412 read_result->value = deserializer.Deserialize(&error_code, &error_msg); | 412 read_result->value = deserializer.Deserialize(&error_code, &error_msg); |
413 read_result->error = HandleReadErrors(read_result->value.get()); | 413 read_result->error = HandleReadErrors(read_result->value.get()); |
414 } | 414 } |
415 } | 415 } |
416 | 416 |
417 OnFileRead(std::move(read_result)); | 417 OnFileRead(std::move(read_result)); |
418 } | 418 } |
419 | 419 |
420 } // namespace filesystem | 420 } // namespace filesystem |
OLD | NEW |