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

Unified Diff: extensions/browser/updater/manifest_fetch_data.h

Issue 465543004: Factor Chrome details out of update manifest fetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
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 79%
rename from chrome/browser/extensions/updater/manifest_fetch_data.h
rename to extensions/browser/updater/manifest_fetch_data.h
index 926b2d4a671f4a1a0b26763fe1a0bac0e22744ab..319136ccab235e1e4e4733ceb86e0a8deb6237ac 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
@@ -96,9 +112,17 @@ 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_;
+
DISALLOW_COPY_AND_ASSIGN(ManifestFetchData);
};
} // namespace extensions
-#endif // CHROME_BROWSER_EXTENSIONS_UPDATER_MANIFEST_FETCH_DATA_H_
+#endif // EXTENSIONS_BROWSER_UPDATER_MANIFEST_FETCH_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698