Set the user agent string correctly on Windows
We use the main executable's ProductName and FileVersion resources to build the user agent string.
This commit is contained in:
parent
70af1f351f
commit
54419bbbb1
1 changed files with 8 additions and 2 deletions
|
@ -1,13 +1,19 @@
|
||||||
#include "common/application_info.h"
|
#include "common/application_info.h"
|
||||||
|
|
||||||
|
#include "base/file_version_info.h"
|
||||||
|
#include "base/memory/scoped_ptr.h"
|
||||||
|
#include "base/utf_string_conversions.h"
|
||||||
|
|
||||||
namespace brightray {
|
namespace brightray {
|
||||||
|
|
||||||
std::string GetApplicationName() {
|
std::string GetApplicationName() {
|
||||||
return std::string();
|
auto info = make_scoped_ptr(FileVersionInfo::CreateFileVersionInfoForModule(GetModuleHandle(nullptr)));
|
||||||
|
return UTF16ToUTF8(info->product_name());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetApplicationVersion() {
|
std::string GetApplicationVersion() {
|
||||||
return std::string();
|
auto info = make_scoped_ptr(FileVersionInfo::CreateFileVersionInfoForModule(GetModuleHandle(nullptr)));
|
||||||
|
return UTF16ToUTF8(info->file_version());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue