metrics: Use the new serialization mechanism in libmetrics
Convert libmetrics to the new serialization mechanism living in
//components/metrics in the chrome repo.
BUG=chromium:374368
TEST=FEATURES=test emerge-amd64-generic metrics
Change-Id: Ia8cf128d04fedd9672fb47096dc6fd87d6a9043d
Reviewed-on: https://chromium-review.googlesource.com/207237
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
diff --git a/metrics/metrics_library.h b/metrics/metrics_library.h
index e34ff4a..9e4be89 100644
--- a/metrics/metrics_library.h
+++ b/metrics/metrics_library.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef METRICS_LIBRARY_H_
-#define METRICS_LIBRARY_H_
+#ifndef METRICS_METRICS_LIBRARY_H_
+#define METRICS_METRICS_LIBRARY_H_
#include <sys/types.h>
#include <string>
@@ -131,18 +131,6 @@
char* buffer, int buffer_size,
bool* result);
- // Sends message to Chrome for transport to UMA and returns true on success.
- bool SendMessageToChrome(const std::string& message);
-
- // Serializes a name/value pair into a message buffer.
- //
- // The serialized format is: | LENGTH | NAME | \0 | VALUE | \0 |
- //
- // where LENGTH is a 32-bit integer in native endianness, and NAME and VALUE
- // are null-terminated strings (the zero bytes are explicitly shown above).
- const std::string FormatChromeMessage(const std::string& name,
- const std::string& value);
-
// This function is used by tests only to mock the device policies.
void SetPolicyProvider(policy::PolicyProvider* provider);
@@ -160,4 +148,4 @@
DISALLOW_COPY_AND_ASSIGN(MetricsLibrary);
};
-#endif // METRICS_LIBRARY_H_
+#endif // METRICS_METRICS_LIBRARY_H_