CPULimiter: Refactor class to manage the CPU limitation.
This new class replaces the functionality embedded in UpdateAttempter
that limits the max CPU usage allowed by update_engine. This refactor
helps reusing this class outside of the brillo UpdateAttempter.
Bug: None
TEST=FEATURES=test emerge-link update_engine
Change-Id: Ib5487d314846b497a44bb78a3b94609571e0fe38
diff --git a/update_engine.gyp b/update_engine.gyp
index 0a40a51..7b0597a 100644
--- a/update_engine.gyp
+++ b/update_engine.gyp
@@ -160,6 +160,7 @@
'common/certificate_checker.cc',
'common/clock.cc',
'common/constants.cc',
+ 'common/cpu_limiter.cc',
'common/hash_calculator.cc',
'common/http_common.cc',
'common/http_fetcher.cc',
@@ -470,6 +471,7 @@
'common/action_processor_unittest.cc',
'common/action_unittest.cc',
'common/certificate_checker_unittest.cc',
+ 'common/cpu_limiter_unittest.cc',
'common/fake_prefs.cc',
'common/hash_calculator_unittest.cc',
'common/http_fetcher_unittest.cc',