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

Unified Diff: components/update_client/component.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 | « no previous file | components/update_client/component.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/component.h
diff --git a/components/update_client/component.h b/components/update_client/component.h
index eae445e9b45d969b8a5de48c45b4ff3e0942ce67..5c88c2e19f96b9893efde548280a52ed903027fe 100644
--- a/components/update_client/component.h
+++ b/components/update_client/component.h
@@ -64,12 +64,14 @@ class Component {
// the update server has return a response containing an update.
bool IsUpdateAvailable() const { return is_update_available_; }
- // Returns true if a ping must be sent back to the server. As a general rule,
- // a ping is sent only for server responses containing instructions to update.
- bool CanPing() const {
- return IsUpdateAvailable() || state() == ComponentState::kUninstalled;
- }
-
+ /*
+ // Returns true if a ping must be sent back to the server. As a general
+ rule,
+ // a ping is sent only for server responses containing instructions to
+ update. bool CanPing() const { return IsUpdateAvailable() || state() ==
+ ComponentState::kUninstalled;
+ }
+ */
base::TimeDelta GetUpdateDuration() const;
ComponentState state() const { return state_->state(); }
@@ -109,9 +111,7 @@ class Component {
bool on_demand() const { return on_demand_; }
void set_on_demand(bool on_demand) { on_demand_ = on_demand; }
- const std::vector<CrxDownloader::DownloadMetrics>& download_metrics() const {
- return download_metrics_;
- }
+ const std::vector<std::string>& events() const { return events_; }
const std::vector<GURL>& crx_diffurls() const { return crx_diffurls_; }
@@ -347,8 +347,7 @@ class Component {
// by a downloader which can do bandwidth throttling on the client side.
bool CanDoBackgroundDownload() const;
- void AppendDownloadMetrics(
- const std::vector<CrxDownloader::DownloadMetrics>& download_metrics);
+ void AppendEvent(const std::string& event);
// Changes the component state and notifies the caller of the |Handle|
// function that the handling of this component state is complete.
@@ -411,7 +410,7 @@ class Component {
int diff_error_code_ = 0;
int diff_extra_code1_ = 0;
- std::vector<CrxDownloader::DownloadMetrics> download_metrics_;
+ std::vector<std::string> events_;
CallbackHandleComplete callback_handle_complete_;
std::unique_ptr<State> state_;
« no previous file with comments | « no previous file | components/update_client/component.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698