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

Side by Side Diff: components/prefs/json_pref_store.cc

Issue 2905903002: Delete the PreferenceMACs on profile deletion. (Closed)
Patch Set: Try loading unloaded profiles before calling OnStoreDeletionFromDisk Created 3 years, 6 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 (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
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::OnStoreDeletionFromDisk() {
388 if (pref_filter_)
389 pref_filter_->OnStoreDeletionFromDisk();
390 }
391
387 void JsonPrefStore::OnFileRead(std::unique_ptr<ReadResult> read_result) { 392 void JsonPrefStore::OnFileRead(std::unique_ptr<ReadResult> read_result) {
388 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 393 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 DCHECK_EQ(31, num_buckets); 593 DCHECK_EQ(31, num_buckets);
589 594
590 // The histogram below is an expansion of the UMA_HISTOGRAM_CUSTOM_COUNTS 595 // The histogram below is an expansion of the UMA_HISTOGRAM_CUSTOM_COUNTS
591 // macro adapted to allow for a dynamically suffixed histogram name. 596 // macro adapted to allow for a dynamically suffixed histogram name.
592 // Note: The factory creates and owns the histogram. 597 // Note: The factory creates and owns the histogram.
593 base::HistogramBase* histogram = base::Histogram::FactoryGet( 598 base::HistogramBase* histogram = base::Histogram::FactoryGet(
594 histogram_name, min_value, max_value, num_buckets, 599 histogram_name, min_value, max_value, num_buckets,
595 base::HistogramBase::kUmaTargetedHistogramFlag); 600 base::HistogramBase::kUmaTargetedHistogramFlag);
596 return histogram; 601 return histogram;
597 } 602 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698