Skip to content

Commit

Permalink
NUX Google Apps - Remove ENABLE_NUX_GOOGLE_APPS flag.
Browse files Browse the repository at this point in the history
The flag made sense when developing initially to allow development on
linux, but as we hit windows only bits, the flag no longer makes sense.

Bug: 832938
Change-Id: I0a1da618114714bc82e0b6e20a2e31ed781a5e10
Reviewed-on: https://chromium-review.googlesource.com/1112710
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Hector Carmona <hcarmona@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570833}
  • Loading branch information
hcarmona authored and Commit Bot committed Jun 27, 2018
1 parent 20c8bb0 commit c98557a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 33 deletions.
3 changes: 1 addition & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import("//build/config/features.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
import("//components/nacl/features.gni")
import("//components/nux_google_apps/features.gni")
import("//device/vr/buildflags/buildflags.gni")
import("//extensions/buildflags/buildflags.gni")
import("//media/media_options.gni")
Expand Down Expand Up @@ -1185,7 +1184,7 @@ if (closure_compile) {
if (is_android) {
data_deps += [ "components/offline_pages/resources:closure_compile" ]
}
if (enable_nux_google_apps) {
if (is_win) {
data_deps += [ "components/nux_google_apps/resources:closure_compile" ]
}
}
Expand Down
4 changes: 1 addition & 3 deletions chrome/browser/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import("//build/split_static_library.gni")
import("//chrome/common/features.gni")
import("//chromeos/assistant/assistant.gni")
import("//components/nacl/features.gni")
import("//components/nux_google_apps/features.gni")
import("//components/offline_pages/buildflags/features.gni")
import("//components/signin/features.gni")
import("//extensions/buildflags/buildflags.gni")
Expand Down Expand Up @@ -956,7 +955,6 @@ split_static_library("ui") {
"//components/net_log",
"//components/ntp_snippets",
"//components/ntp_tiles",
"//components/nux_google_apps:buildflags",
"//components/offline_pages/buildflags",
"//components/omnibox/browser",
"//components/onc",
Expand Down Expand Up @@ -3862,7 +3860,7 @@ split_static_library("ui") {
deps += [ "//components/nacl/browser" ]
}

if (enable_nux_google_apps) {
if (is_win) {
deps += [ "//components/nux_google_apps:nux_google_apps_feature" ]
}

Expand Down
10 changes: 5 additions & 5 deletions chrome/browser/ui/webui/welcome_ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <memory>

#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/account_consistency_mode_manager.h"
#include "chrome/browser/ui/webui/welcome_handler.h"
Expand All @@ -14,16 +15,15 @@
#include "chrome/grit/chrome_unscaled_resources.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/nux_google_apps/buildflags.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/web_ui_data_source.h"
#include "net/base/url_util.h"
#include "ui/base/l10n/l10n_util.h"

#if BUILDFLAG(ENABLE_NUX_GOOGLE_APPS)
#if defined(OS_WIN)
#include "components/nux_google_apps/constants.h"
#include "components/nux_google_apps/webui.h"
#endif // ENABLE_NUX_GOOGLE_APPS
#endif // OS_WIN

namespace {
const bool kIsBranded =
Expand Down Expand Up @@ -105,11 +105,11 @@ WelcomeUI::WelcomeUI(content::WebUI* web_ui, const GURL& url)
html_source->SetDefaultResource(IDR_WELCOME_HTML);
}

#if BUILDFLAG(ENABLE_NUX_GOOGLE_APPS)
#if defined(OS_WIN)
if (base::FeatureList::IsEnabled(nux_google_apps::kNuxGoogleAppsFeature)) {
nux_google_apps::AddSources(html_source);
}
#endif // ENABLE_NUX_GOOGLE_APPS
#endif // OS_WIN

content::WebUIDataSource::Add(profile, html_source);
}
Expand Down
11 changes: 1 addition & 10 deletions components/nux_google_apps/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@
# 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("//components/nux_google_apps/features.gni")

# Always required.
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [ "ENABLE_NUX_GOOGLE_APPS=$enable_nux_google_apps" ]
}

if (enable_nux_google_apps) {
if (is_win) {
static_library("nux_google_apps_feature") {
sources = [
"constants.cc",
Expand Down
10 changes: 0 additions & 10 deletions components/nux_google_apps/features.gni

This file was deleted.

2 changes: 0 additions & 2 deletions components/resources/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//components/nux_google_apps/features.gni")
import("//printing/buildflags/buildflags.gni")
import("//tools/grit/grit_rule.gni")
import("//third_party/brotli/brotli.gni")
Expand Down Expand Up @@ -33,7 +32,6 @@ grit("components_resources") {
defines = [
"enable_basic_printing=$enable_basic_printing",
"enable_print_preview=$enable_print_preview",
"enable_nux_google_apps=$enable_nux_google_apps",
]

deps = [
Expand Down
2 changes: 1 addition & 1 deletion components/resources/components_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<part file="net_log_resources.grdp" />
<part file="neterror_resources.grdp" />
<part file="ntp_tiles_resources.grdp" />
<if expr="enable_nux_google_apps">
<if expr="is_win">
<part file="nux_google_apps.grdp" />
</if>
<part file="offline_pages_resources.grdp" />
Expand Down

0 comments on commit c98557a

Please sign in to comment.