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

Side by Side Diff: chrome/browser/prefs/tracked/tracked_atomic_preference.cc

Issue 620933002: Move all files related to tracked preferences from c/b/prefs to c/b/prefs/tracked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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_atomic_preference.h" 5 #include "chrome/browser/prefs/tracked/tracked_atomic_preference.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/prefs/pref_hash_store_transaction.h" 8 #include "chrome/browser/prefs/tracked/pref_hash_store_transaction.h"
9 #include "chrome/browser/prefs/tracked/tracked_preference_validation_delegate.h" 9 #include "chrome/browser/prefs/tracked/tracked_preference_validation_delegate.h"
10 10
11 TrackedAtomicPreference::TrackedAtomicPreference( 11 TrackedAtomicPreference::TrackedAtomicPreference(
12 const std::string& pref_path, 12 const std::string& pref_path,
13 size_t reporting_id, 13 size_t reporting_id,
14 size_t reporting_ids_count, 14 size_t reporting_ids_count,
15 PrefHashFilter::EnforcementLevel enforcement_level, 15 PrefHashFilter::EnforcementLevel enforcement_level,
16 TrackedPreferenceValidationDelegate* delegate) 16 TrackedPreferenceValidationDelegate* delegate)
17 : pref_path_(pref_path), 17 : pref_path_(pref_path),
18 helper_(pref_path, reporting_id, reporting_ids_count, enforcement_level), 18 helper_(pref_path, reporting_id, reporting_ids_count, enforcement_level),
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 if (value_state != PrefHashStoreTransaction::UNCHANGED) { 52 if (value_state != PrefHashStoreTransaction::UNCHANGED) {
53 // Store the hash for the new value (whether it was reset or not). 53 // Store the hash for the new value (whether it was reset or not).
54 const base::Value* new_value = NULL; 54 const base::Value* new_value = NULL;
55 pref_store_contents->Get(pref_path_, &new_value); 55 pref_store_contents->Get(pref_path_, &new_value);
56 transaction->StoreHash(pref_path_, new_value); 56 transaction->StoreHash(pref_path_, new_value);
57 } 57 }
58 58
59 return was_reset; 59 return was_reset;
60 } 60 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/tracked/tracked_atomic_preference.h ('k') | chrome/browser/prefs/tracked/tracked_preference_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698