Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1167)

Unified Diff: components/update_client/protocol_builder.h

Issue 2888183003: Consolidate the update_client serialization code. (Closed)
Patch Set: wip Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/update_client/ping_manager_unittest.cc ('k') | components/update_client/protocol_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/protocol_builder.h
diff --git a/components/update_client/protocol_builder.h b/components/update_client/protocol_builder.h
index 7a76d2753f94b60394ec8b1706596f39cc087bca..9b2f4a51ab2fbad05b48fe6fa68a4848e52d32b4 100644
--- a/components/update_client/protocol_builder.h
+++ b/components/update_client/protocol_builder.h
@@ -10,6 +10,7 @@
#include <vector>
#include "components/update_client/component.h"
+#include "components/update_client/crx_downloader.h"
#include "components/update_client/updater_state.h"
namespace update_client {
@@ -57,6 +58,19 @@ std::string BuildUpdateCheckRequest(
std::string BuildEventPingRequest(const Configurator& config,
const Component& component);
+// Returns a string representing one ping event for the update of a component.
+// The event type for this ping event is 3.
+std::string BuildUpdateCompleteEventElement(const Component& component);
+
+// Returns a string representing one ping event for the uninstall of a
+// component. The event type for this ping event is 4.
+std::string BuildUninstalledEventElement(const Component& component);
+
+// Returns a string representing a download complete event corresponding to
+// one download metrics instance. The event type for this ping event is 14.
+std::string BuildDownloadCompleteEventElement(
+ const CrxDownloader::DownloadMetrics& metrics);
+
// An update protocol request starts with a common preamble which includes
// version and platform information for Chrome and the operating system,
// followed by a request body, which is the actual payload of the request.
« no previous file with comments | « components/update_client/ping_manager_unittest.cc ('k') | components/update_client/protocol_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698