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

Unified Diff: chrome/browser/extensions/extension_service.cc

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: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index dee4596c0957a91fe46dd672bdb2ccb9b96c9ece..d7ff7ad5f26f55a4ae74507dd097b48df5743a65 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -40,6 +40,8 @@
#include "chrome/browser/extensions/updater/extension_cache.h"
#include "chrome/browser/extensions/updater/extension_downloader.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
+#include "chrome/browser/google/google_brand.h"
+#include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/profile_identity_provider.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
@@ -56,6 +58,7 @@
#include "chrome/common/extensions/manifest_url_handler.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "components/omaha_query_params/omaha_query_params.h"
#include "components/signin/core/browser/signin_manager.h"
#include "components/startup_metric_utils/startup_metric_utils.h"
#include "content/public/browser/devtools_agent_host.h"
@@ -596,7 +599,19 @@ scoped_ptr<ExtensionDownloader> ExtensionService::CreateExtensionDownloader(
delegate,
profile_->GetRequestContext()));
downloader->SetWebstoreIdentityProvider(identity_provider.Pass());
-#endif
+#if defined(GOOGLE_CHROME_BUILD)
+ std::string brand;
+ google_brand::GetBrand(&brand);
+ if (!brand.empty() && !google_brand::IsOrganic(brand))
not at google - send to devlin 2014/08/13 01:30:02 I read this as IsOrganic(bread). Yum.
+ downloader->SetBrandCode(brand);
+#endif // defined(GOOGLE_CHROME_BUILD)
+ downloader->SetManifestQueryParams(
+ omaha_query_params::OmahaQueryParams::Get(
+ omaha_query_params::OmahaQueryParams::CRX));
+ downloader->EnablePingDataForDomain("google.com");
+ downloader->EnableExtraUpdateMetrics(
+ ChromeMetricsServiceAccessor::IsMetricsReportingEnabled());
+#endif // defined(ENABLE_EXTENSIONS)
return downloader.Pass();
}

Powered by Google App Engine
This is Rietveld 408576698