| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 &PostWriteCallback, callbacks.second, | 377 &PostWriteCallback, callbacks.second, |
| 378 base::Bind(&JsonPrefStore::RunOrScheduleNextSuccessfulWriteCallback, | 378 base::Bind(&JsonPrefStore::RunOrScheduleNextSuccessfulWriteCallback, |
| 379 AsWeakPtr()), | 379 AsWeakPtr()), |
| 380 base::SequencedTaskRunnerHandle::Get())); | 380 base::SequencedTaskRunnerHandle::Get())); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void JsonPrefStore::ClearMutableValues() { | 383 void JsonPrefStore::ClearMutableValues() { |
| 384 NOTIMPLEMENTED(); | 384 NOTIMPLEMENTED(); |
| 385 } | 385 } |
| 386 | 386 |
| 387 void JsonPrefStore::CleanupForProfileDeletion() { |
| 388 if (pref_filter_) |
| 389 pref_filter_->CleanupForProfileDeletion(); |
| 390 } |
| 391 |
| 387 void JsonPrefStore::OnFileRead(std::unique_ptr<ReadResult> read_result) { | 392 void JsonPrefStore::OnFileRead(std::unique_ptr<ReadResult> read_result) { |
| 388 DCHECK(CalledOnValidThread()); | 393 DCHECK(CalledOnValidThread()); |
| 389 | 394 |
| 390 DCHECK(read_result); | 395 DCHECK(read_result); |
| 391 | 396 |
| 392 std::unique_ptr<base::DictionaryValue> unfiltered_prefs( | 397 std::unique_ptr<base::DictionaryValue> unfiltered_prefs( |
| 393 new base::DictionaryValue); | 398 new base::DictionaryValue); |
| 394 | 399 |
| 395 read_error_ = read_result->error; | 400 read_error_ = read_result->error; |
| 396 | 401 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 DCHECK_EQ(31, num_buckets); | 592 DCHECK_EQ(31, num_buckets); |
| 588 | 593 |
| 589 // The histogram below is an expansion of the UMA_HISTOGRAM_CUSTOM_COUNTS | 594 // The histogram below is an expansion of the UMA_HISTOGRAM_CUSTOM_COUNTS |
| 590 // macro adapted to allow for a dynamically suffixed histogram name. | 595 // macro adapted to allow for a dynamically suffixed histogram name. |
| 591 // Note: The factory creates and owns the histogram. | 596 // Note: The factory creates and owns the histogram. |
| 592 base::HistogramBase* histogram = base::Histogram::FactoryGet( | 597 base::HistogramBase* histogram = base::Histogram::FactoryGet( |
| 593 histogram_name, min_value, max_value, num_buckets, | 598 histogram_name, min_value, max_value, num_buckets, |
| 594 base::HistogramBase::kUmaTargetedHistogramFlag); | 599 base::HistogramBase::kUmaTargetedHistogramFlag); |
| 595 return histogram; | 600 return histogram; |
| 596 } | 601 } |
| OLD | NEW |