OLD | NEW |
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/prefs/json_pref_store.h" | 5 #include "components/prefs/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> |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 DCHECK(CalledOnValidThread()); | 316 DCHECK(CalledOnValidThread()); |
317 | 317 |
318 if (pref_filter_) | 318 if (pref_filter_) |
319 pref_filter_->FilterUpdate(key); | 319 pref_filter_->FilterUpdate(key); |
320 | 320 |
321 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key)); | 321 FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key)); |
322 | 322 |
323 ScheduleWrite(flags); | 323 ScheduleWrite(flags); |
324 } | 324 } |
325 | 325 |
326 void JsonPrefStore::RegisterOnNextSuccessfulWriteCallback( | 326 void JsonPrefStore::RegisterOnNextSuccessfulWriteReply( |
327 const base::Closure& on_next_successful_write) { | 327 const base::Closure& on_next_successful_write_reply) { |
328 DCHECK(CalledOnValidThread()); | 328 DCHECK(CalledOnValidThread()); |
329 | 329 |
330 writer_.RegisterOnNextSuccessfulWriteCallback(on_next_successful_write); | 330 writer_.RegisterOnNextSuccessfulWriteReply(on_next_successful_write_reply); |
331 } | 331 } |
332 | 332 |
333 void JsonPrefStore::ClearMutableValues() { | 333 void JsonPrefStore::ClearMutableValues() { |
334 NOTIMPLEMENTED(); | 334 NOTIMPLEMENTED(); |
335 } | 335 } |
336 | 336 |
337 void JsonPrefStore::OnFileRead(std::unique_ptr<ReadResult> read_result) { | 337 void JsonPrefStore::OnFileRead(std::unique_ptr<ReadResult> read_result) { |
338 DCHECK(CalledOnValidThread()); | 338 DCHECK(CalledOnValidThread()); |
339 | 339 |
340 DCHECK(read_result); | 340 DCHECK(read_result); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 DCHECK_EQ(31, num_buckets); | 533 DCHECK_EQ(31, num_buckets); |
534 | 534 |
535 // The histogram below is an expansion of the UMA_HISTOGRAM_CUSTOM_COUNTS | 535 // The histogram below is an expansion of the UMA_HISTOGRAM_CUSTOM_COUNTS |
536 // macro adapted to allow for a dynamically suffixed histogram name. | 536 // macro adapted to allow for a dynamically suffixed histogram name. |
537 // Note: The factory creates and owns the histogram. | 537 // Note: The factory creates and owns the histogram. |
538 base::HistogramBase* histogram = base::Histogram::FactoryGet( | 538 base::HistogramBase* histogram = base::Histogram::FactoryGet( |
539 histogram_name, min_value, max_value, num_buckets, | 539 histogram_name, min_value, max_value, num_buckets, |
540 base::HistogramBase::kUmaTargetedHistogramFlag); | 540 base::HistogramBase::kUmaTargetedHistogramFlag); |
541 return histogram; | 541 return histogram; |
542 } | 542 } |
OLD | NEW |