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

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

Issue 2905903002: Delete the PreferenceMACs on profile deletion. (Closed)
Patch Set: Update comments Created 3 years, 4 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
« no previous file with comments | « components/prefs/json_pref_store.h ('k') | components/prefs/json_pref_store_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « components/prefs/json_pref_store.h ('k') | components/prefs/json_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698