| 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 951034c3918125a81e45b7f18ab92bb12ea33596..03bb6ca79914322fbeb056a299f4c772b878975f 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::AccuracyLevel() const {
|
| + DCHECK(IsAvailable());
|
| + switch (data_provider_->GetAccuracyLevel()) {
|
| + case PowerDataProvider::High:
|
| + return "High";
|
| + case PowerDataProvider::Medium:
|
| + return "Medium";
|
| + case PowerDataProvider::Low:
|
| + return "Low";
|
| + }
|
| + return "";
|
| +}
|
| +
|
| PowerProfilerService* PowerProfilerService::GetInstance() {
|
| return Singleton<PowerProfilerService>::get();
|
| }
|
|
|