Pretend to be Chrome by default.
This is used to cheat client web drivers.
This commit is contained in:
parent
b8a6658ba9
commit
925ff2da5b
2 changed files with 7 additions and 0 deletions
|
@ -7,6 +7,8 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "atom/common/chrome_version.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
AtomContentClient::AtomContentClient() {
|
AtomContentClient::AtomContentClient() {
|
||||||
|
@ -15,6 +17,10 @@ AtomContentClient::AtomContentClient() {
|
||||||
AtomContentClient::~AtomContentClient() {
|
AtomContentClient::~AtomContentClient() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string AtomContentClient::GetProduct() const {
|
||||||
|
return "Chrome/" CHROME_VERSION_STRING;
|
||||||
|
}
|
||||||
|
|
||||||
void AtomContentClient::AddAdditionalSchemes(
|
void AtomContentClient::AddAdditionalSchemes(
|
||||||
std::vector<std::string>* standard_schemes,
|
std::vector<std::string>* standard_schemes,
|
||||||
std::vector<std::string>* savable_schemes) {
|
std::vector<std::string>* savable_schemes) {
|
||||||
|
|
|
@ -19,6 +19,7 @@ class AtomContentClient : public brightray::ContentClient {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// content::ContentClient:
|
// content::ContentClient:
|
||||||
|
virtual std::string GetProduct() const OVERRIDE;
|
||||||
virtual void AddAdditionalSchemes(
|
virtual void AddAdditionalSchemes(
|
||||||
std::vector<std::string>* standard_schemes,
|
std::vector<std::string>* standard_schemes,
|
||||||
std::vector<std::string>* savable_schemes) OVERRIDE;
|
std::vector<std::string>* savable_schemes) OVERRIDE;
|
||||||
|
|
Loading…
Reference in a new issue