| 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_store_impl.h" | 5 #include "components/user_prefs/tracked/pref_hash_store_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" |
| 8 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 9 #include "base/values.h" | 12 #include "base/values.h" |
| 10 #include "components/user_prefs/tracked/hash_store_contents.h" | 13 #include "components/user_prefs/tracked/hash_store_contents.h" |
| 11 #include "components/user_prefs/tracked/pref_hash_store_transaction.h" | 14 #include "components/user_prefs/tracked/pref_hash_store_transaction.h" |
| 12 | 15 |
| 13 class PrefHashStoreImpl::PrefHashStoreTransactionImpl | 16 class PrefHashStoreImpl::PrefHashStoreTransactionImpl |
| 14 : public PrefHashStoreTransaction { | 17 : public PrefHashStoreTransaction { |
| 15 public: | 18 public: |
| 16 // Constructs a PrefHashStoreTransactionImpl which can use the private | 19 // Constructs a PrefHashStoreTransactionImpl which can use the private |
| 17 // members of its |outer| PrefHashStoreImpl. | 20 // members of its |outer| PrefHashStoreImpl. |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 bool PrefHashStoreImpl::PrefHashStoreTransactionImpl::IsSuperMACValid() const { | 302 bool PrefHashStoreImpl::PrefHashStoreTransactionImpl::IsSuperMACValid() const { |
| 300 return super_mac_valid_; | 303 return super_mac_valid_; |
| 301 } | 304 } |
| 302 | 305 |
| 303 bool PrefHashStoreImpl::PrefHashStoreTransactionImpl::StampSuperMac() { | 306 bool PrefHashStoreImpl::PrefHashStoreTransactionImpl::StampSuperMac() { |
| 304 if (!outer_->use_super_mac_ || super_mac_valid_) | 307 if (!outer_->use_super_mac_ || super_mac_valid_) |
| 305 return false; | 308 return false; |
| 306 super_mac_dirty_ = true; | 309 super_mac_dirty_ = true; |
| 307 return true; | 310 return true; |
| 308 } | 311 } |
| OLD | NEW |