summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_updater.cc
diff options
context:
space:
mode:
authorrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 17:49:27 +0000
committerrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 17:49:27 +0000
commit1d70bdfef0f6cd5a4cf122365eaeb9f66747340a (patch)
treecda39e0acef1fe0724b56846f629df620c2e3c10 /chrome/browser/extensions/extension_updater.cc
parent4db3e9ddb4e2c0ce95196bb0a035a3b08dfdfc61 (diff)
downloadchromium_src-1d70bdfef0f6cd5a4cf122365eaeb9f66747340a.zip
chromium_src-1d70bdfef0f6cd5a4cf122365eaeb9f66747340a.tar.gz
chromium_src-1d70bdfef0f6cd5a4cf122365eaeb9f66747340a.tar.bz2
Add brand code to app extension URLs. This should only occur for non-organic
brand code. BUG=94920 TEST=Make sure to install chrome with a non-organic brand code. Look at the update checks from any installed extensions (the default apps will do) and make sure they have "brand%3DXXXX" in the URL, where XXXX is the brand code. Review URL: http://codereview.chromium.org/8113007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_updater.cc')
-rw-r--r--chrome/browser/extensions/extension_updater.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc
index 0a4874d..6dc0420 100644
--- a/chrome/browser/extensions/extension_updater.cc
+++ b/chrome/browser/extensions/extension_updater.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/extensions/crx_installer.h"
#include "chrome/browser/extensions/extension_error_reporter.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
@@ -186,8 +187,15 @@ bool ManifestFetchData::AddExtension(std::string id, std::string version,
parts.push_back("ap=" + net::EscapeQueryParamValue(update_url_data, true));
}
- // Append rollcall and active ping parameters.
+ // Append brand code, rollcall and active ping parameters.
if (base_url_.DomainIs("google.com")) {
+#if defined(GOOGLE_CHROME_BUILD)
+ std::string brand;
+ google_util::GetBrand(&brand);
+ if (!brand.empty() && !google_util::IsOrganic(brand))
+ parts.push_back("brand=" + brand);
+#endif
+
std::string ping_value;
pings_[id] = PingData(0, 0);