mirror of
https://github.com/electron/electron.git
synced 2026-01-11 00:18:02 -05:00
Pretend to be Chrome by default.
This is used to cheat client web drivers.
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "atom/common/chrome_version.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
AtomContentClient::AtomContentClient() {
|
||||
@@ -15,6 +17,10 @@ AtomContentClient::AtomContentClient() {
|
||||
AtomContentClient::~AtomContentClient() {
|
||||
}
|
||||
|
||||
std::string AtomContentClient::GetProduct() const {
|
||||
return "Chrome/" CHROME_VERSION_STRING;
|
||||
}
|
||||
|
||||
void AtomContentClient::AddAdditionalSchemes(
|
||||
std::vector<std::string>* standard_schemes,
|
||||
std::vector<std::string>* savable_schemes) {
|
||||
|
||||
@@ -19,6 +19,7 @@ class AtomContentClient : public brightray::ContentClient {
|
||||
|
||||
protected:
|
||||
// content::ContentClient:
|
||||
virtual std::string GetProduct() const OVERRIDE;
|
||||
virtual void AddAdditionalSchemes(
|
||||
std::vector<std::string>* standard_schemes,
|
||||
std::vector<std::string>* savable_schemes) OVERRIDE;
|
||||
|
||||
Reference in New Issue
Block a user