| Index: extensions/browser/updater/manifest_fetch_data.h
|
| diff --git a/chrome/browser/extensions/updater/manifest_fetch_data.h b/extensions/browser/updater/manifest_fetch_data.h
|
| similarity index 80%
|
| rename from chrome/browser/extensions/updater/manifest_fetch_data.h
|
| rename to extensions/browser/updater/manifest_fetch_data.h
|
| index 36a77c8497f296cfb1c0d7e0b2942cc4431fa0de..a9f3355557db91428ce5a40f4a4f8e1e27b75464 100644
|
| --- a/chrome/browser/extensions/updater/manifest_fetch_data.h
|
| +++ b/extensions/browser/updater/manifest_fetch_data.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 CHROME_BROWSER_EXTENSIONS_UPDATER_MANIFEST_FETCH_DATA_H_
|
| -#define CHROME_BROWSER_EXTENSIONS_UPDATER_MANIFEST_FETCH_DATA_H_
|
| +#ifndef EXTENSIONS_BROWSER_UPDATER_MANIFEST_FETCH_DATA_H_
|
| +#define EXTENSIONS_BROWSER_UPDATER_MANIFEST_FETCH_DATA_H_
|
|
|
| #include <map>
|
| #include <set>
|
| @@ -22,6 +22,18 @@ class ManifestFetchData {
|
| public:
|
| static const int kNeverPinged = -1;
|
|
|
| + // What ping mode this fetch should use.
|
| + enum PingMode {
|
| + // No ping, no extra metrics.
|
| + NO_PING,
|
| +
|
| + // Ping without extra metrics.
|
| + PING,
|
| +
|
| + // Ping with extra metrics.
|
| + PING_WITH_METRICS,
|
| + };
|
| +
|
| // Each ping type is sent at most once per day.
|
| enum PingType {
|
| // Used for counting total installs of an extension/app/theme.
|
| @@ -46,7 +58,11 @@ class ManifestFetchData {
|
| : rollcall_days(rollcall), active_days(active), is_enabled(enabled) {}
|
| };
|
|
|
| - ManifestFetchData(const GURL& update_url, int request_id);
|
| + ManifestFetchData(const GURL& update_url,
|
| + int request_id,
|
| + const std::string& brand_code,
|
| + const std::string& base_query_params,
|
| + PingMode ping_mode);
|
| ~ManifestFetchData();
|
|
|
| // Returns true if this extension information was successfully added. If the
|
| @@ -100,6 +116,14 @@ class ManifestFetchData {
|
| // one ManifestFetchData.
|
| std::set<int> request_ids_;
|
|
|
| + // The brand code to include with manifest fetch queries, if non-empty and
|
| + // |ping_mode_| >= PING.
|
| + const std::string brand_code_;
|
| +
|
| + // The ping mode for this fetch. This determines whether or not ping data
|
| + // (and possibly extra metrics) will be included in the fetch query.
|
| + const PingMode ping_mode_;
|
| +
|
| // The set of extension IDs for which this fetch forced a CRX update.
|
| std::set<std::string> forced_updates_;
|
|
|
| @@ -108,4 +132,4 @@ class ManifestFetchData {
|
|
|
| } // namespace extensions
|
|
|
| -#endif // CHROME_BROWSER_EXTENSIONS_UPDATER_MANIFEST_FETCH_DATA_H_
|
| +#endif // EXTENSIONS_BROWSER_UPDATER_MANIFEST_FETCH_DATA_H_
|
|
|