-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 10279: Set updater endpoint at build time #5854
Conversation
42e0db2
to
1979203
Compare
common/BUILD.gn
Outdated
@@ -1,6 +1,18 @@ | |||
import("//build/util/branding.gni") | |||
import("//extensions/buildflags/buildflags.gni") | |||
|
|||
declare_args() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to go in components/component_updater/BUILD.gn
. Components https://github.com/brave/brave-core/pull/5854/files#diff-5fd6956fd190ef97f5703d18f6c1fa5d cannot depend on //brave/common
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bridiver - Moved to components/brave_component_updater/browser
- let me know if that's good - https://github.com/brave/brave-core/pull/5854/files#diff-deb253279892c75adef317ec6e816ce8
18e5080
to
8394318
Compare
@@ -11,6 +11,10 @@ source_set("browser") { | |||
"switches.h", | |||
] | |||
|
|||
configs += [ | |||
"//brave/components/brave_component_updater/browser:network_config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just make this a public config of brave/components/brave_component_updater/browser
browser/net/BUILD.gn
Outdated
configs += [ "//brave/build/geolocation" ] | ||
configs += [ | ||
"//brave/build/geolocation", | ||
"//brave/components/brave_component_updater/browser:network_config", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would stay as-is with https://github.com/brave/brave-core/pull/5854/files#r442516329 because this doesn't have or need a dep on //brave/components/brave_component_updater/browser
updater_prod_endpoint = "" | ||
} | ||
|
||
config("network_config") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - this name doesn't really make sense to me, I could call it either updater_config
or just config
and make it a public config for browser
as mentioned below
41e1851
to
92d19f9
Compare
source_set("browser") { | ||
sources = [ | ||
"brave_component.cc", | ||
"brave_component.h", | ||
"brave_component_features.cc", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow established patterns: brave_component_features.cc -> features.cc and the same thing with switches.cc
dec2352
to
1fe23d8
Compare
6ee0c25
to
db3ab1b
Compare
|
||
#include "brave/components/brave_component_updater/browser/features.h" | ||
|
||
namespace features { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be brave_component_updater
#define BRAVE_COMPONENTS_BRAVE_COMPONENT_UPDATER_BROWSER_FEATURES_H_ | ||
|
||
#include "base/feature_list.h" | ||
#include "build/build_config.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if this is header is needed, at least it can be moved to .cc ?
|
||
#include "brave/components/brave_component_updater/browser/switches.h" | ||
|
||
namespace switches { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace brave_component_updater
@@ -0,0 +1,13 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra blank line
|
||
namespace switches { | ||
|
||
extern const char kUseGoUpdateDev[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be constexpr char kUseGoUpdateDev[] = " .."
, this way .cc
is not needed
Resolves brave/brave-browser#10279
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
brave://components
, verify the following components download successfully:--use-dev-goupdater-url
flag.Reviewer Checklist:
After-merge Checklist:
changes has landed on.