Skip to content
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

Apply device id v2 #4159

Merged
merged 10 commits into from Dec 30, 2019

convert sync endpoint to gn config

  • Loading branch information
bridiver committed Dec 26, 2019
commit a5c94c1c40f6af9dcd4c062bf6ae1576f035a6c9
@@ -4,6 +4,20 @@ import("//tools/grit/grit_rule.gni")
import("//tools/grit/repack.gni")
import("buildflags/buildflags.gni")

declare_args() {
brave_sync_endpoint = "https://sync-staging.brave.com"
This conversation was marked as resolved by AlexeyBarabash

This comment has been minimized.

Copy link
@AlexeyBarabash

AlexeyBarabash Dec 26, 2019

Contributor

Should the default value point to the production?
As a default sync lib DEPS point to the production, so after doing clean checkout and run npm run build sync will not work.

This comment has been minimized.

Copy link
@bridiver

bridiver Dec 27, 2019

Collaborator

I'm confused about what this url should be because this points to staging as well https://github.com/brave/sync/blob/75c1bb10c4a54275de4fb10afd9f204cc07284a8/client/polyfill/chrome.js#L14

This comment has been minimized.

Copy link
@bridiver

bridiver Dec 27, 2019

Collaborator

why are we hardcoding the url here and in the library?

This comment has been minimized.

Copy link
@AlexeyBarabash

AlexeyBarabash Dec 30, 2019

Contributor

We had Slack discussion and agreed we need to improve versioning and deployment of sync lib
brave/sync#364.

}

if (is_official_build) {
brave_sync_endpoint = "https://sync.brave.com"
}

config("brave_sync_config") {
defines = [
"BRAVE_SYNC_ENDPOINT=\"$brave_sync_endpoint\""
]
}

if (enable_brave_sync) {
source_set("js_sync_lib_impl") {
sources = [
@@ -18,6 +32,7 @@ if (enable_brave_sync) {
"client/client_ext_impl_data.h",
]

configs += [ ":brave_sync_config" ]
deps = [
":core",
":crypto",
@@ -428,7 +428,7 @@ void BraveProfileSyncServiceImpl::OnGetInitData(

client_data::Config config;
config.api_version = brave_sync_prefs_->GetApiVersion();
config.server_url = "https://sync-staging.brave.com";
config.server_url = BRAVE_SYNC_ENDPOINT;
config.debug = true;
brave_sync_client_->SendGotInitData(seed, device_id, config, device_id_v2);
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.