Commit 0e2c414c authored by Alex Chau's avatar Alex Chau Committed by Commit Bot

Add build flag to enable DISCOVERY registration

Bug: 1043148
Change-Id: I0789a40948bf74123ce50685726034d11ceedbd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2007764Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Commit-Queue: Alex Chau <alexchau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733379}
parent 2d0664cc
...@@ -1962,6 +1962,7 @@ jumbo_static_library("browser") { ...@@ -1962,6 +1962,7 @@ jumbo_static_library("browser") {
"//chrome/browser/resource_coordinator:mojo_bindings", "//chrome/browser/resource_coordinator:mojo_bindings",
"//chrome/browser/resource_coordinator:tab_manager_features", "//chrome/browser/resource_coordinator:tab_manager_features",
"//chrome/browser/safe_browsing", "//chrome/browser/safe_browsing",
"//chrome/browser/sharing:buildflags",
"//chrome/browser/sharing/proto", "//chrome/browser/sharing/proto",
"//chrome/browser/ssl:proto", "//chrome/browser/ssl:proto",
"//chrome/browser/touch_to_fill", "//chrome/browser/touch_to_fill",
......
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//chrome/browser/sharing/buildflags.gni")
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [ "ENABLE_DISCOVERY=$enable_discovery" ]
}
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
declare_args() {
enable_discovery = false
}
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/feature_list.h" #include "base/feature_list.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/sharing/buildflags.h"
#include "chrome/browser/sharing/click_to_call/feature.h" #include "chrome/browser/sharing/click_to_call/feature.h"
#include "chrome/browser/sharing/shared_clipboard/feature_flags.h" #include "chrome/browser/sharing/shared_clipboard/feature_flags.h"
#include "chrome/browser/sharing/sharing_constants.h" #include "chrome/browser/sharing/sharing_constants.h"
...@@ -252,6 +253,9 @@ SharingDeviceRegistration::GetEnabledFeatures() const { ...@@ -252,6 +253,9 @@ SharingDeviceRegistration::GetEnabledFeatures() const {
enabled_features.insert(SharingSpecificFields::REMOTE_COPY); enabled_features.insert(SharingSpecificFields::REMOTE_COPY);
if (IsPeerConnectionSupported()) if (IsPeerConnectionSupported())
enabled_features.insert(SharingSpecificFields::PEER_CONNECTION); enabled_features.insert(SharingSpecificFields::PEER_CONNECTION);
#if BUILDFLAG(ENABLE_DISCOVERY)
enabled_features.insert(SharingSpecificFields::DISCOVERY);
#endif
return enabled_features; return enabled_features;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment