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

Unified Diff: chrome/browser/extensions/updater/extension_downloader.h

Issue 475423002: Reland: Factor Chrome details out of update manifest fetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: uh merge fail? Created 6 years, 3 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: chrome/browser/extensions/updater/extension_downloader.h
diff --git a/chrome/browser/extensions/updater/extension_downloader.h b/chrome/browser/extensions/updater/extension_downloader.h
index 74d4594028800414a051c70100c8a802bf89e75b..34b6a97942ca1305543ed51d4466282a94956118 100644
--- a/chrome/browser/extensions/updater/extension_downloader.h
+++ b/chrome/browser/extensions/updater/extension_downloader.h
@@ -19,8 +19,8 @@
#include "base/memory/weak_ptr.h"
#include "base/version.h"
#include "chrome/browser/extensions/updater/extension_downloader_delegate.h"
-#include "chrome/browser/extensions/updater/manifest_fetch_data.h"
#include "chrome/browser/extensions/updater/request_queue.h"
+#include "extensions/browser/updater/manifest_fetch_data.h"
#include "extensions/common/extension.h"
#include "extensions/common/update_manifest.h"
#include "google_apis/gaia/oauth2_token_service.h"
@@ -100,6 +100,22 @@ class ExtensionDownloader
void SetWebstoreIdentityProvider(
scoped_ptr<IdentityProvider> identity_provider);
+ void set_brand_code(const std::string& brand_code) {
+ brand_code_ = brand_code;
+ }
+
+ void set_manifest_query_params(const std::string& params) {
+ manifest_query_params_ = params;
+ }
+
+ void set_ping_enabled_domain(const std::string& domain) {
+ ping_enabled_domain_ = domain;
+ }
+
+ void set_enable_extra_update_metrics(bool enable) {
+ enable_extra_update_metrics_ = enable;
+ }
+
// These are needed for unit testing, to help identify the correct mock
// URLFetcher objects.
static const int kManifestFetcherId = 1;
@@ -246,6 +262,9 @@ class ExtensionDownloader
virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request,
const GoogleServiceAuthError& error) OVERRIDE;
+ ManifestFetchData* CreateManifestFetchData(const GURL& update_url,
+ int request_id);
+
// The delegate that receives the crx files downloaded by the
// ExtensionDownloader, and that fills in optional ping and update url data.
ExtensionDownloaderDelegate* delegate_;
@@ -290,6 +309,20 @@ class ExtensionDownloader
// A pending token fetch request.
scoped_ptr<OAuth2TokenService::Request> access_token_request_;
+ // Brand code to include with manifest fetch queries if sending ping data.
+ std::string brand_code_;
+
+ // Baseline parameters to include with manifest fetch queries.
+ std::string manifest_query_params_;
+
+ // Domain to enable ping data. Ping data will be sent with manifest fetches
+ // to update URLs which match this domain. Defaults to empty (no domain).
+ std::string ping_enabled_domain_;
+
+ // Indicates whether or not extra metrics should be included with ping data.
+ // Defaults to |false|.
+ bool enable_extra_update_metrics_;
+
// Used to create WeakPtrs to |this|.
base::WeakPtrFactory<ExtensionDownloader> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698