| Index: content/browser/power_profiler/power_profiler_service.cc
|
| diff --git a/content/browser/power_profiler/power_profiler_service.cc b/content/browser/power_profiler/power_profiler_service.cc
|
| index 026b42ab893fbfb2b7fbabdf49ff11ae5c4b18b2..84ddb1bd15abbb6a4239902d366432efe2dd31f5 100644
|
| --- a/content/browser/power_profiler/power_profiler_service.cc
|
| +++ b/content/browser/power_profiler/power_profiler_service.cc
|
| @@ -42,10 +42,23 @@ PowerProfilerService::PowerProfilerService(
|
| PowerProfilerService::~PowerProfilerService() {
|
| }
|
|
|
| -bool PowerProfilerService::IsAvailable() {
|
| +bool PowerProfilerService::IsAvailable() const {
|
| return status_ != UNINITIALIZED;
|
| }
|
|
|
| +std::string PowerProfilerService::GetAccuracyLevel() const {
|
| + DCHECK(IsAvailable());
|
| + switch (data_provider_->GetAccuracyLevel()) {
|
| + case PowerDataProvider::High:
|
| + return "High";
|
| + case PowerDataProvider::Moderate:
|
| + return "Moderate";
|
| + case PowerDataProvider::Low:
|
| + return "Low";
|
| + }
|
| + return "";
|
| +}
|
| +
|
| PowerProfilerService* PowerProfilerService::GetInstance() {
|
| return Singleton<PowerProfilerService>::get();
|
| }
|
|
|