update_engine: Change DLC metadata path

Change the location of the DLC metadata from /var/lib/dlc to
/var/lib/update_engine/dlc_prefs/ to make update_engine the owner of
metadata.

BUG=chromium:912666
TEST=cros_workon_make update_engine --test
TEST=install and uninstall DLCs on DUT. Check new prefs path.

Change-Id: I75f5506eee1abc834ad89a7cf363f42e384b695b
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2140007
Tested-by: Andrew Lassalle <andrewlassalle@chromium.org>
Commit-Queue: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/update_attempter.h b/update_attempter.h
index 9e48179..e270b59 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -439,13 +439,15 @@
   // Resets interactivity and forced update flags.
   void ResetInteractivityFlags();
 
-  // Get the integer values from the metadata directory set in |prefs| for
-  // |kPrefsPingLastActive| or |kPrefsPingLastRollcall|.
+  // Resets all the DLC prefs.
+  bool ResetDlcPrefs(const std::string& dlc_id);
+
+  // Get the integer values from the DLC metadata for |kPrefsPingLastActive|
+  // or |kPrefsPingLastRollcall|.
   // The value is equal to -2 when the value cannot be read or is not numeric.
   // The value is equal to -1 the first time it is being sent, which is
   // when the metadata file doesn't exist.
-  int64_t GetPingMetadata(const PrefsInterface& prefs,
-                          const std::string& metadata_name) const;
+  int64_t GetPingMetadata(const std::string& metadata_key) const;
 
   // Calculates the update parameters for DLCs. Sets the |dlc_ids_|
   // parameter on the |omaha_request_params_| object.