diff options
author | asargent <asargent@chromium.org> | 2014-11-19 07:50:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-19 15:50:48 +0000 |
commit | cd3127f9c92eed5afaf4f72fa1bd431975d3cdd8 (patch) | |
tree | 67d3296cab6d207eff5076f3e308dfc089937097 /extensions/browser/updater | |
parent | a75daf29f6141b54865ab6ea253db55775efa692 (diff) | |
download | chromium_src-cd3127f9c92eed5afaf4f72fa1bd431975d3cdd8.zip chromium_src-cd3127f9c92eed5afaf4f72fa1bd431975d3cdd8.tar.gz chromium_src-cd3127f9c92eed5afaf4f72fa1bd431975d3cdd8.tar.bz2 |
Always send enabled state in extension update checks
This changes the extension update system to always send a flag for
whether each extension is enabled or not when checking for updates, and
if it is disabled what the reasons are. The behavior before this patch is
to only send this metric when UMA is turned on. We already do not send cookies
with these requests, so the privacy review team gave sign off for this.
BUG=433376
Review URL: https://codereview.chromium.org/739033002
Cr-Commit-Position: refs/heads/master@{#304817}
Diffstat (limited to 'extensions/browser/updater')
-rw-r--r-- | extensions/browser/updater/extension_downloader.cc | 9 | ||||
-rw-r--r-- | extensions/browser/updater/manifest_fetch_data.cc | 6 | ||||
-rw-r--r-- | extensions/browser/updater/manifest_fetch_data.h | 4 |
3 files changed, 7 insertions, 12 deletions
diff --git a/extensions/browser/updater/extension_downloader.cc b/extensions/browser/updater/extension_downloader.cc index 3068027..da4ff41 100644 --- a/extensions/browser/updater/extension_downloader.cc +++ b/extensions/browser/updater/extension_downloader.cc @@ -952,13 +952,8 @@ ManifestFetchData* ExtensionDownloader::CreateManifestFetchData( const GURL& update_url, int request_id) { ManifestFetchData::PingMode ping_mode = ManifestFetchData::NO_PING; - if (update_url.DomainIs(ping_enabled_domain_.c_str())) { - if (enable_extra_update_metrics_) { - ping_mode = ManifestFetchData::PING_WITH_METRICS; - } else { - ping_mode = ManifestFetchData::PING; - } - } + if (update_url.DomainIs(ping_enabled_domain_.c_str())) + ping_mode = ManifestFetchData::PING_WITH_ENABLED_STATE; return new ManifestFetchData( update_url, request_id, brand_code_, manifest_query_params_, ping_mode); } diff --git a/extensions/browser/updater/manifest_fetch_data.cc b/extensions/browser/updater/manifest_fetch_data.cc index 2f73acb..6511a1e 100644 --- a/extensions/browser/updater/manifest_fetch_data.cc +++ b/extensions/browser/updater/manifest_fetch_data.cc @@ -22,7 +22,7 @@ namespace { // request. We want to stay under 2K because of proxies, etc. const int kExtensionsManifestMaxURLSize = 2000; -void AddMetricsToPing(std::string* ping_value, +void AddEnabledStateToPing(std::string* ping_value, const ManifestFetchData::PingData* ping_data) { *ping_value += "&e=" + std::string(ping_data->is_enabled ? "1" : "0"); if (!ping_data->is_enabled) { @@ -125,8 +125,8 @@ bool ManifestFetchData::AddExtension(const std::string& id, if (ping_data->rollcall_days == kNeverPinged || ping_data->rollcall_days > 0) { ping_value += "r=" + base::IntToString(ping_data->rollcall_days); - if (ping_mode_ == PING_WITH_METRICS) - AddMetricsToPing(&ping_value, ping_data); + if (ping_mode_ == PING_WITH_ENABLED_STATE) + AddEnabledStateToPing(&ping_value, ping_data); pings_[id].rollcall_days = ping_data->rollcall_days; pings_[id].is_enabled = ping_data->is_enabled; } diff --git a/extensions/browser/updater/manifest_fetch_data.h b/extensions/browser/updater/manifest_fetch_data.h index 8f33ab3..6ff3396 100644 --- a/extensions/browser/updater/manifest_fetch_data.h +++ b/extensions/browser/updater/manifest_fetch_data.h @@ -30,8 +30,8 @@ class ManifestFetchData { // Ping without extra metrics. PING, - // Ping with extra metrics. - PING_WITH_METRICS, + // Ping with information about enabled/disabled state. + PING_WITH_ENABLED_STATE, }; // Each ping type is sent at most once per day. |