Index: content/browser/browser_process_sub_thread.cc |
diff --git a/content/browser/browser_process_sub_thread.cc b/content/browser/browser_process_sub_thread.cc |
index 9a5b78a9edb0096cf39c4b9160294ba85379b82e..fe7c93698b1d81392ec4ca6df5fa90289d79f55d 100644 |
--- a/content/browser/browser_process_sub_thread.cc |
+++ b/content/browser/browser_process_sub_thread.cc |
@@ -9,6 +9,7 @@ |
#include "build/build_config.h" |
#include "content/browser/browser_child_process_host_impl.h" |
#include "content/browser/notification_service_impl.h" |
+#include "content/browser/power_profiler/power_profiler_service.h" |
#include "net/url_request/url_fetcher.h" |
#include "net/url_request/url_request.h" |
@@ -42,12 +43,18 @@ void BrowserProcessSubThread::Init() { |
base::ThreadRestrictions::SetIOAllowed(false); |
base::ThreadRestrictions::DisallowWaiting(); |
} |
+ if (BrowserThread::CurrentlyOn(BrowserThread::POWER_PROFILER)) { |
+ power_profiler_service_.reset(new PowerProfilerService); |
pfeldman
2014/01/09 11:38:58
You should either use lazy_init, singleton or Brow
|
+ } |
} |
void BrowserProcessSubThread::CleanUp() { |
if (BrowserThread::CurrentlyOn(BrowserThread::IO)) |
IOThreadPreCleanUp(); |
+ if (BrowserThread::CurrentlyOn(BrowserThread::POWER_PROFILER)) |
+ PowerProfilerThreadPreCleanUp(); |
+ |
BrowserThreadImpl::CleanUp(); |
notification_service_.reset(); |
@@ -72,4 +79,8 @@ void BrowserProcessSubThread::IOThreadPreCleanUp() { |
#endif // !defined(OS_IOS) |
} |
+void BrowserProcessSubThread::PowerProfilerThreadPreCleanUp() { |
+ power_profiler_service_.reset(); |
+} |
+ |
} // namespace content |