OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/user_prefs/tracked/pref_hash_filter.h" | 5 #include "components/user_prefs/tracked/pref_hash_filter.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 } | 48 } |
49 | 49 |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 PrefHashFilter::PrefHashFilter( | 52 PrefHashFilter::PrefHashFilter( |
53 std::unique_ptr<PrefHashStore> pref_hash_store, | 53 std::unique_ptr<PrefHashStore> pref_hash_store, |
54 StoreContentsPair external_validation_hash_store_pair, | 54 StoreContentsPair external_validation_hash_store_pair, |
55 const std::vector<TrackedPreferenceMetadata>& tracked_preferences, | 55 const std::vector<TrackedPreferenceMetadata>& tracked_preferences, |
56 const base::Closure& on_reset_on_load, | 56 const base::Closure& on_reset_on_load, |
57 TrackedPreferenceValidationDelegate* delegate, | 57 prefs::mojom::TrackedPreferenceValidationDelegate* delegate, |
58 size_t reporting_ids_count, | 58 size_t reporting_ids_count, |
59 bool report_super_mac_validity) | 59 bool report_super_mac_validity) |
60 : pref_hash_store_(std::move(pref_hash_store)), | 60 : pref_hash_store_(std::move(pref_hash_store)), |
61 external_validation_hash_store_pair_( | 61 external_validation_hash_store_pair_( |
62 external_validation_hash_store_pair.first | 62 external_validation_hash_store_pair.first |
63 ? base::make_optional( | 63 ? base::make_optional( |
64 std::move(external_validation_hash_store_pair)) | 64 std::move(external_validation_hash_store_pair)) |
65 : base::nullopt), | 65 : base::nullopt), |
66 on_reset_on_load_(on_reset_on_load), | 66 on_reset_on_load_(on_reset_on_load), |
67 report_super_mac_validity_(report_super_mac_validity) { | 67 report_super_mac_validity_(report_super_mac_validity) { |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 // which owns the pointers. | 361 // which owns the pointers. |
362 HashStoreContents* raw_contents = hash_store_contents_copy.get(); | 362 HashStoreContents* raw_contents = hash_store_contents_copy.get(); |
363 base::DictionaryValue* raw_changed_paths_macs = changed_paths_macs.get(); | 363 base::DictionaryValue* raw_changed_paths_macs = changed_paths_macs.get(); |
364 | 364 |
365 return std::make_pair( | 365 return std::make_pair( |
366 base::Bind(&ClearFromExternalStore, base::Unretained(raw_contents), | 366 base::Bind(&ClearFromExternalStore, base::Unretained(raw_contents), |
367 base::Unretained(raw_changed_paths_macs)), | 367 base::Unretained(raw_changed_paths_macs)), |
368 base::Bind(&FlushToExternalStore, base::Passed(&hash_store_contents_copy), | 368 base::Bind(&FlushToExternalStore, base::Passed(&hash_store_contents_copy), |
369 base::Passed(&changed_paths_macs))); | 369 base::Passed(&changed_paths_macs))); |
370 } | 370 } |
OLD | NEW |