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

Side by Side Diff: components/filesystem/public/cpp/prefs/filesystem_json_pref_store.cc

Issue 1662523004: Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698