OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/prefs/tracked/tracked_split_preference.h" | 5 #include "chrome/browser/prefs/tracked/tracked_split_preference.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/browser/prefs/pref_hash_store_transaction.h" | 11 #include "chrome/browser/prefs/tracked/pref_hash_store_transaction.h" |
12 #include "chrome/browser/prefs/tracked/tracked_preference_validation_delegate.h" | 12 #include "chrome/browser/prefs/tracked/tracked_preference_validation_delegate.h" |
13 | 13 |
14 TrackedSplitPreference::TrackedSplitPreference( | 14 TrackedSplitPreference::TrackedSplitPreference( |
15 const std::string& pref_path, | 15 const std::string& pref_path, |
16 size_t reporting_id, | 16 size_t reporting_id, |
17 size_t reporting_ids_count, | 17 size_t reporting_ids_count, |
18 PrefHashFilter::EnforcementLevel enforcement_level, | 18 PrefHashFilter::EnforcementLevel enforcement_level, |
19 TrackedPreferenceValidationDelegate* delegate) | 19 TrackedPreferenceValidationDelegate* delegate) |
20 : pref_path_(pref_path), | 20 : pref_path_(pref_path), |
21 helper_(pref_path, reporting_id, reporting_ids_count, enforcement_level), | 21 helper_(pref_path, reporting_id, reporting_ids_count, enforcement_level), |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 if (value_state != PrefHashStoreTransaction::UNCHANGED) { | 79 if (value_state != PrefHashStoreTransaction::UNCHANGED) { |
80 // Store the hash for the new value (whether it was reset or not). | 80 // Store the hash for the new value (whether it was reset or not). |
81 const base::DictionaryValue* new_dict_value = NULL; | 81 const base::DictionaryValue* new_dict_value = NULL; |
82 pref_store_contents->GetDictionary(pref_path_, &new_dict_value); | 82 pref_store_contents->GetDictionary(pref_path_, &new_dict_value); |
83 transaction->StoreSplitHash(pref_path_, new_dict_value); | 83 transaction->StoreSplitHash(pref_path_, new_dict_value); |
84 } | 84 } |
85 | 85 |
86 return was_reset; | 86 return was_reset; |
87 } | 87 } |
OLD | NEW |