| 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 &PostWriteCallback, callbacks.second, | 386 &PostWriteCallback, callbacks.second, |
| 387 base::Bind(&JsonPrefStore::RunOrScheduleNextSuccessfulWriteCallback, | 387 base::Bind(&JsonPrefStore::RunOrScheduleNextSuccessfulWriteCallback, |
| 388 AsWeakPtr()), | 388 AsWeakPtr()), |
| 389 base::SequencedTaskRunnerHandle::Get())); | 389 base::SequencedTaskRunnerHandle::Get())); |
| 390 } | 390 } |
| 391 | 391 |
| 392 void JsonPrefStore::ClearMutableValues() { | 392 void JsonPrefStore::ClearMutableValues() { |
| 393 NOTIMPLEMENTED(); | 393 NOTIMPLEMENTED(); |
| 394 } | 394 } |
| 395 | 395 |
| 396 void JsonPrefStore::OnStoreDeletionFromDisk() { |
| 397 if (pref_filter_) |
| 398 pref_filter_->OnStoreDeletionFromDisk(); |
| 399 } |
| 400 |
| 396 void JsonPrefStore::OnFileRead(std::unique_ptr<ReadResult> read_result) { | 401 void JsonPrefStore::OnFileRead(std::unique_ptr<ReadResult> read_result) { |
| 397 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); | 402 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
| 398 | 403 |
| 399 DCHECK(read_result); | 404 DCHECK(read_result); |
| 400 | 405 |
| 401 std::unique_ptr<base::DictionaryValue> unfiltered_prefs( | 406 std::unique_ptr<base::DictionaryValue> unfiltered_prefs( |
| 402 new base::DictionaryValue); | 407 new base::DictionaryValue); |
| 403 | 408 |
| 404 read_error_ = read_result->error; | 409 read_error_ = read_result->error; |
| 405 | 410 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 DCHECK_EQ(31, num_buckets); | 602 DCHECK_EQ(31, num_buckets); |
| 598 | 603 |
| 599 // The histogram below is an expansion of the UMA_HISTOGRAM_CUSTOM_COUNTS | 604 // The histogram below is an expansion of the UMA_HISTOGRAM_CUSTOM_COUNTS |
| 600 // macro adapted to allow for a dynamically suffixed histogram name. | 605 // macro adapted to allow for a dynamically suffixed histogram name. |
| 601 // Note: The factory creates and owns the histogram. | 606 // Note: The factory creates and owns the histogram. |
| 602 base::HistogramBase* histogram = base::Histogram::FactoryGet( | 607 base::HistogramBase* histogram = base::Histogram::FactoryGet( |
| 603 histogram_name, min_value, max_value, num_buckets, | 608 histogram_name, min_value, max_value, num_buckets, |
| 604 base::HistogramBase::kUmaTargetedHistogramFlag); | 609 base::HistogramBase::kUmaTargetedHistogramFlag); |
| 605 return histogram; | 610 return histogram; |
| 606 } | 611 } |
| OLD | NEW |