Skip to content
Permalink
Browse files

common: set Iridium version and change User-Agent accordingly

Reduced version number:
We do not use @build@ or @patch@, in particular not in the User-Agent
string.

As for the user agent, continue providing Chrome/* for possible
compatibility checks by the browser and/or websites, since we
really are still Chromium.

Note to self:
Update "Chromium/*" in UA string when updating chrome/version.
  • Loading branch information
jengelh committed Jul 8, 2015
1 parent 0ccca1c commit a7730b08b0474aaa8e6e0b05228cdaaba4a4734d
@@ -1,4 +1,4 @@
MAJOR=78
MINOR=0
BUILD=3904
PATCH=87
MAJOR=2019
MINOR=11
BUILD=79
PATCH=0
@@ -16,7 +16,7 @@
namespace version_info {

std::string GetProductNameAndVersionForUserAgent() {
return "Chrome/" + GetVersionNumber();
return "Iridium/" + GetVersionNumber();
}

std::string GetProductName() {
@@ -6,7 +6,7 @@
#define COMPONENTS_VERSION_INFO_VERSION_INFO_VALUES_H_

#define PRODUCT_NAME "@PRODUCT_FULLNAME@"
#define PRODUCT_VERSION "@MAJOR@.@MINOR@.@BUILD@.@PATCH@"
#define PRODUCT_VERSION "@MAJOR@.@MINOR@"
#define LAST_CHANGE "@LASTCHANGE@"
#define IS_OFFICIAL_BUILD @OFFICIAL_BUILD@

@@ -196,6 +196,8 @@ std::string BuildUserAgentFromOSAndProduct(const std::string& os_info,
product.c_str(),
WEBKIT_VERSION_MAJOR,
WEBKIT_VERSION_MINOR);
if (strncmp(product.c_str(), "Chrome/", 7) != 0)
base::StringAppendF(&user_agent, " Chrome/79.0.0.0");
return user_agent;
}

@@ -7,7 +7,7 @@
#ifndef EXTENSIONS_SHELL_COMMON_VERSION_H_
#define EXTENSIONS_SHELL_COMMON_VERSION_H_

#define PRODUCT_VERSION "@MAJOR@.@MINOR@.@BUILD@.@PATCH@"
#define PRODUCT_VERSION "@MAJOR@.@MINOR@"
#define LAST_CHANGE "@LASTCHANGE@"

#endif // EXTENSIONS_SHELL_COMMON_VERSION_H_
@@ -73,7 +73,7 @@
'Base histogram. Use suffixes of this histogram instead.')

EXPIRY_DATE_PATTERN = "%Y-%m-%d"
EXPIRY_MILESTONE_RE = re.compile(r'M[0-9]{2,3}\Z')
EXPIRY_MILESTONE_RE = re.compile(r'M[0-9]{2,4}\Z')


class Error(Exception):
@@ -15,8 +15,8 @@
import merge_xml

_DATE_FILE_RE = re.compile(r".*MAJOR_BRANCH_DATE=(.+).*")
_CURRENT_MILESTONE_RE = re.compile(r"MAJOR=([0-9]{2,3})\n")
_MILESTONE_EXPIRY_RE = re.compile(r"\AM([0-9]{2,3})")
_CURRENT_MILESTONE_RE = re.compile(r"MAJOR=([0-9]{2,4})\n")
_MILESTONE_EXPIRY_RE = re.compile(r"\AM([0-9]{2,4})")

_SCRIPT_NAME = "generate_expired_histograms_array.py"
_HASH_DATATYPE = "uint64_t"

0 comments on commit a7730b0

Please sign in to comment.
You can’t perform that action at this time.