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

Unified Diff: chrome/browser/metrics/perf/perf_provider_chromeos.cc

Issue 2912843002: Replace deprecated base::NonThreadSafe in chrome/browser/metrics/perf in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/metrics/perf/perf_provider_chromeos.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/perf/perf_provider_chromeos.cc
diff --git a/chrome/browser/metrics/perf/perf_provider_chromeos.cc b/chrome/browser/metrics/perf/perf_provider_chromeos.cc
index 09e2f66e7b59590cd76ee07d30b441c494dbb49f..5a348d56cf11d2c83528017a57942c2dd09b9e0a 100644
--- a/chrome/browser/metrics/perf/perf_provider_chromeos.cc
+++ b/chrome/browser/metrics/perf/perf_provider_chromeos.cc
@@ -316,6 +316,7 @@ PerfProvider::PerfProvider()
}
PerfProvider::~PerfProvider() {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
chromeos::LoginState::Get()->RemoveObserver(&login_observer_);
}
@@ -460,7 +461,7 @@ void PerfProvider::SetCollectionParamsFromVariationParams(
bool PerfProvider::GetSampledProfiles(
std::vector<SampledProfile>* sampled_profiles) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (cached_perf_data_.empty()) {
AddToPerfHistogram(NOT_READY_TO_UPLOAD);
return false;
@@ -495,7 +496,7 @@ void PerfProvider::ParseOutputProtoIfValid(
std::unique_ptr<SampledProfile> sampled_profile,
PerfSubcommand subcommand,
const std::string& perf_stdout) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// |perf_output_call_| called us, and owns |perf_stdout|. We must delete it,
// but not before parsing |perf_stdout|, and we may return early.
@@ -646,7 +647,7 @@ void PerfProvider::Deactivate() {
}
void PerfProvider::ScheduleIntervalCollection() {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (timer_.IsRunning())
return;
@@ -678,7 +679,7 @@ void PerfProvider::ScheduleIntervalCollection() {
void PerfProvider::CollectIfNecessary(
std::unique_ptr<SampledProfile> sampled_profile) {
- DCHECK(CalledOnValidThread());
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Schedule another interval collection. This call makes sense regardless of
// whether or not the current collection was interval-triggered. If it had
« no previous file with comments | « chrome/browser/metrics/perf/perf_provider_chromeos.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698