Discussion:
[chromium-discuss] Detect browser Chrome or Chromium
Alex Nikiforov
2018-11-26 22:28:31 UTC
Permalink
Hi, I think that question was answered many times, but, unfortunately, I
haven't found any modern way to detect Chrome VS Chromium.

It used to be possible with UA, but I have installed latest Chromium on my
Mac:
*Chromium UA:*
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML,
like Gecko) *Chrome*/72.0.3623.0 Safari/537.36
*Chrome UA:*
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML,
like Gecko) *Chrome*/70.0.3538.102 Safari/537.36

Also, was possible to detect with *chrome.webstore*, but according to the
following link will be not possible soon
https://blog.chromium.org/2018/06/improving-extension-transparency-for.html

Is there any legit way to detect Chromium?
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
PhistucK
2018-11-27 11:03:21 UTC
Permalink
First, out of curiosity, why do you need to distinguish between them?

Second, do you know when the user agent string changed to be
indistinguishable?

☆*PhistucK*
Post by Alex Nikiforov
Hi, I think that question was answered many times, but, unfortunately, I
haven't found any modern way to detect Chrome VS Chromium.
It used to be possible with UA, but I have installed latest Chromium on my
*Chromium UA:*
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML,
like Gecko) *Chrome*/72.0.3623.0 Safari/537.36
*Chrome UA:*
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML,
like Gecko) *Chrome*/70.0.3538.102 Safari/537.36
Also, was possible to detect with *chrome.webstore*, but according to the
following link will be not possible soon
https://blog.chromium.org/2018/06/improving-extension-transparency-for.html
Is there any legit way to detect Chromium?
--
--
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups
"Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Alex Nikiforov
2018-11-27 20:13:55 UTC
Permalink
Hi,

Our product is not supported on Chromium due to many differences with
Chrome including but not limited to codecs.

Unfortunately, I do not. We used UA, but recently found out that it doesn't
work anymore, then started to search how we can do it and, apparently,
there is no way to distinguish two products anymore.

I checked on Linux too and its exactly same UA for Chrome and Chromium
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
*Chrome*/70.0.3538.110 Safari/537.36

I dug into the code a bit, it seems it sets "Chrome/" always

*https://github.com/chromium/chromium/blob/master/components/version_info/version_info.cc
<https://github.com/chromium/chromium/blob/master/components/version_info/version_info.cc>*
std::string GetProductNameAndVersionForUserAgent() {
return "Chrome/" + GetVersionNumber();
}

*chrome/common/chrome_content_client.cc*
std::string GetProduct() {
return version_info::GetProductNameAndVersionForUserAgent();
}
...
std::string GetUserAgent() {
..
std::string product = GetProduct();
#if defined(OS_ANDROID)
if (command_line->HasSwitch(switches::kUseMobileUserAgent))
product += " Mobile";
#endif
return content::BuildUserAgentFromProduct(product);
}

Thanks
Post by PhistucK
First, out of curiosity, why do you need to distinguish between them?
Second, do you know when the user agent string changed to be
indistinguishable?
☆*PhistucK*
Post by Alex Nikiforov
Hi, I think that question was answered many times, but, unfortunately, I
haven't found any modern way to detect Chrome VS Chromium.
It used to be possible with UA, but I have installed latest Chromium on
*Chromium UA:*
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36
(KHTML, like Gecko) *Chrome*/72.0.3623.0 Safari/537.36
*Chrome UA:*
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36
(KHTML, like Gecko) *Chrome*/70.0.3538.102 Safari/537.36
Also, was possible to detect with *chrome.webstore*, but according to
the following link will be not possible soon
https://blog.chromium.org/2018/06/improving-extension-transparency-for.html
Is there any legit way to detect Chromium?
--
--
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups
"Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
PhistucK
2018-11-27 20:28:41 UTC
Permalink
Yeah, I am not sure it ever had Chromium there. Maybe you have seen it used
by independent releases of Chromium for Linux.
Post by Alex Nikiforov
many differences
There are not that many, so this is a surprising term.

Anyway, what is wrong with feature detection, which is the recommended way
of "block it is not supported"?

☆*PhistucK*
Post by Alex Nikiforov
Hi,
Our product is not supported on Chromium due to many differences with
Chrome including but not limited to codecs.
Unfortunately, I do not. We used UA, but recently found out that it
doesn't work anymore, then started to search how we can do it and,
apparently, there is no way to distinguish two products anymore.
I checked on Linux too and its exactly same UA for Chrome and Chromium
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
*Chrome*/70.0.3538.110 Safari/537.36
I dug into the code a bit, it seems it sets "Chrome/" always
*https://github.com/chromium/chromium/blob/master/components/version_info/version_info.cc
<https://github.com/chromium/chromium/blob/master/components/version_info/version_info.cc>*
std::string GetProductNameAndVersionForUserAgent() {
return "Chrome/" + GetVersionNumber();
}
*chrome/common/chrome_content_client.cc*
std::string GetProduct() {
return version_info::GetProductNameAndVersionForUserAgent();
}
...
std::string GetUserAgent() {
..
std::string product = GetProduct();
#if defined(OS_ANDROID)
if (command_line->HasSwitch(switches::kUseMobileUserAgent))
product += " Mobile";
#endif
return content::BuildUserAgentFromProduct(product);
}
Thanks
Post by PhistucK
First, out of curiosity, why do you need to distinguish between them?
Second, do you know when the user agent string changed to be
indistinguishable?
☆*PhistucK*
Post by Alex Nikiforov
Hi, I think that question was answered many times, but, unfortunately, I
haven't found any modern way to detect Chrome VS Chromium.
It used to be possible with UA, but I have installed latest Chromium on
*Chromium UA:*
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36
(KHTML, like Gecko) *Chrome*/72.0.3623.0 Safari/537.36
*Chrome UA:*
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36
(KHTML, like Gecko) *Chrome*/70.0.3538.102 Safari/537.36
Also, was possible to detect with *chrome.webstore*, but according to
the following link will be not possible soon
https://blog.chromium.org/2018/06/improving-extension-transparency-for.html
Is there any legit way to detect Chromium?
--
--
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google
Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Alex Nikiforov
2018-11-27 20:49:29 UTC
Permalink
Nothing is wrong, but I thought we can do it based on the UA.

Thanks for the help!
Post by PhistucK
Yeah, I am not sure it ever had Chromium there. Maybe you have seen it
used by independent releases of Chromium for Linux.
Post by Alex Nikiforov
many differences
There are not that many, so this is a surprising term.
Anyway, what is wrong with feature detection, which is the recommended way
of "block it is not supported"?
☆*PhistucK*
Post by Alex Nikiforov
Hi,
Our product is not supported on Chromium due to many differences with
Chrome including but not limited to codecs.
Unfortunately, I do not. We used UA, but recently found out that it
doesn't work anymore, then started to search how we can do it and,
apparently, there is no way to distinguish two products anymore.
I checked on Linux too and its exactly same UA for Chrome and Chromium
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
*Chrome*/70.0.3538.110 Safari/537.36
I dug into the code a bit, it seems it sets "Chrome/" always
*https://github.com/chromium/chromium/blob/master/components/version_info/version_info.cc
<https://github.com/chromium/chromium/blob/master/components/version_info/version_info.cc>*
std::string GetProductNameAndVersionForUserAgent() {
return "Chrome/" + GetVersionNumber();
}
*chrome/common/chrome_content_client.cc*
std::string GetProduct() {
return version_info::GetProductNameAndVersionForUserAgent();
}
...
std::string GetUserAgent() {
..
std::string product = GetProduct();
#if defined(OS_ANDROID)
if (command_line->HasSwitch(switches::kUseMobileUserAgent))
product += " Mobile";
#endif
return content::BuildUserAgentFromProduct(product);
}
Thanks
Post by PhistucK
First, out of curiosity, why do you need to distinguish between them?
Second, do you know when the user agent string changed to be
indistinguishable?
☆*PhistucK*
Post by Alex Nikiforov
Hi, I think that question was answered many times, but, unfortunately,
I haven't found any modern way to detect Chrome VS Chromium.
It used to be possible with UA, but I have installed latest Chromium on
*Chromium UA:*
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36
(KHTML, like Gecko) *Chrome*/72.0.3623.0 Safari/537.36
*Chrome UA:*
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36
(KHTML, like Gecko) *Chrome*/70.0.3538.102 Safari/537.36
Also, was possible to detect with *chrome.webstore*, but according to
the following link will be not possible soon
https://blog.chromium.org/2018/06/improving-extension-transparency-for.html
Is there any legit way to detect Chromium?
--
--
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google
Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Loading...