add BRAVE_BROWSER_VERSION for version_info.cc

This commit is contained in:
bridiver
2018-07-25 10:50:56 -07:00
parent 99acbf7c97
commit 87bb61caeb
4 changed files with 22 additions and 8 deletions
+15 -6
View File
@@ -2,10 +2,6 @@ import("//brave/build/config.gni")
import("//build/config/features.gni")
source_set("browser_process") {
defines = [
"BRAVE_BROWSER_VERSION=\"$brave_version\"",
]
sources = [
"autocomplete/brave_autocomplete_scheme_classifier.cc",
"autocomplete/brave_autocomplete_scheme_classifier.h",
@@ -49,11 +45,11 @@ source_set("browser_process") {
"sparkle_glue_mac.h",
"update_util.cc",
"update_util.h",
"version_info.cc",
"version_info.h",
]
deps = [
":version_info",
"//brave/browser/payments",
"//brave/components/brave_shields/browser:brave_shields",
"//brave/components/content_settings/core/browser",
@@ -77,6 +73,19 @@ source_set("browser_process") {
}
}
source_set("version_info") {
# these are only for version_info.cc and should not be exposed as public configs
configs += [ "//brave/build:version" ]
defines = [
"BRAVE_BROWSER_VERSION=\"$brave_version\"",
]
sources = [
"version_info.cc",
"version_info.h",
]
}
source_set("browser") {
sources = [
"brave_content_browser_client.cc",
+2 -2
View File
@@ -11,7 +11,7 @@
#include "chrome/browser/net/system_network_context_manager.h"
#include "chrome/common/channel_info.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/version_info/version_info.h"
#include "brave/browser/version_info.h"
#include "net/base/load_flags.h"
#include "net/base/url_util.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
@@ -57,7 +57,7 @@ GURL GetUpdateURL(const brave::BraveStatsUpdaterParams& stats_updater_params) {
update_url =
net::AppendQueryParameter(update_url, "channel", GetChannelName());
update_url = net::AppendQueryParameter(update_url, "version",
BRAVE_BROWSER_VERSION);
version_info::GetBraveVersionWithoutChromiumMajorVersion());
update_url = net::AppendQueryParameter(update_url, "daily",
stats_updater_params.GetDailyParam());
update_url = net::AppendQueryParameter(update_url, "weekly",
+4
View File
@@ -6,6 +6,10 @@
namespace version_info {
std::string GetBraveVersionWithoutChromiumMajorVersion() {
return std::string(BRAVE_BROWSER_VERSION);
}
std::string GetBraveVersionNumberForDisplay() {
return std::string(BRAVE_BROWSER_VERSION) +
" Chromium: " + BRAVE_CHROMIUM_VERSION;
+1
View File
@@ -15,6 +15,7 @@ if (brave_chromium_build) {
config("compiler") {}
}
# do not expose this as a public config anywhere
config("version") {
defines = [
"BRAVE_CHROMIUM_VERSION=\"$chrome_version_string\"",