Merge "metricsd: Add more assert clause." am: 8f8ce0c300

am: b65e80e534

* commit 'b65e80e534c8e0ca1f2008960ae435594a608e32':
  metricsd: Add more assert clause.
This commit is contained in:
Bertrand Simonnet 2016-01-22 22:28:01 +00:00 committed by android-build-merger
commit d14662e3bb
2 changed files with 5 additions and 0 deletions

View File

@ -85,5 +85,6 @@ void MetricsLog::IncrementUncleanShutdownCount(unsigned int count) {
}
bool MetricsLog::PopulateSystemProfile(SystemProfileSetter* profile_setter) {
CHECK(profile_setter);
return profile_setter->Populate(uma_proto());
}

View File

@ -80,6 +80,10 @@ bool SystemProfileCache::Initialize() {
} else {
reader.Load();
auto client = update_engine::UpdateEngineClient::CreateInstance();
if (!client) {
LOG(ERROR) << "failed to create the update engine client";
return false;
}
if (!client->GetChannel(&channel)) {
LOG(ERROR) << "failed to read the current channel from update engine.";
return false;