Commit 750635ec authored by Scott Chen's avatar Scott Chen Committed by Commit Bot

NUX: move constants to a common file

Change-Id: I1e715390161876f72de0ad5c9496f81c0a6939ee
Reviewed-on: https://chromium-review.googlesource.com/1188890
Commit-Queue: Scott Chen <scottchen@chromium.org>
Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587351}
parent 69ada591
...@@ -3888,6 +3888,7 @@ jumbo_split_static_library("ui") { ...@@ -3888,6 +3888,7 @@ jumbo_split_static_library("ui") {
if (is_win && is_chrome_branded) { if (is_win && is_chrome_branded) {
deps += [ deps += [
"//components/nux:constants",
"//components/nux:email_feature", "//components/nux:email_feature",
"//components/nux:google_apps_feature", "//components/nux:google_apps_feature",
] ]
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#endif // defined(OS_WIN) #endif // defined(OS_WIN)
#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
#include "components/nux/google_apps/constants.h" #include "components/nux/constants.h"
#include "components/nux/google_apps/google_apps_handler.h" #include "components/nux/google_apps/google_apps_handler.h"
#endif // defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) #endif // defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#if defined(OS_WIN) #if defined(OS_WIN)
#include "base/win/windows_version.h" #include "base/win/windows_version.h"
#if defined(GOOGLE_CHROME_BUILD) #if defined(GOOGLE_CHROME_BUILD)
#include "components/nux/google_apps/constants.h" #include "components/nux/constants.h"
#endif // defined(GOOGLE_CHROME_BUILD) #endif // defined(GOOGLE_CHROME_BUILD)
#endif // defined(OS_WIN) #endif // defined(OS_WIN)
......
...@@ -25,9 +25,8 @@ ...@@ -25,9 +25,8 @@
#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "components/nux/email/constants.h" #include "components/nux/constants.h"
#include "components/nux/email/email_handler.h" #include "components/nux/email/email_handler.h"
#include "components/nux/google_apps/constants.h"
#include "components/nux/google_apps/google_apps_handler.h" #include "components/nux/google_apps/google_apps_handler.h"
#include "components/nux/show_promo_delegate.h" #include "components/nux/show_promo_delegate.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
......
...@@ -5,10 +5,19 @@ ...@@ -5,10 +5,19 @@
import("//build/config/chrome_build.gni") import("//build/config/chrome_build.gni")
if (is_win && is_chrome_branded) { if (is_win && is_chrome_branded) {
source_set("constants") {
sources = [
"constants.cc",
"constants.h",
]
public_deps = [
"//base",
]
}
static_library("email_feature") { static_library("email_feature") {
sources = [ sources = [
"email/constants.cc",
"email/constants.h",
"email/email_handler.cc", "email/email_handler.cc",
"email/email_handler.h", "email/email_handler.h",
] ]
...@@ -35,8 +44,6 @@ if (is_win && is_chrome_branded) { ...@@ -35,8 +44,6 @@ if (is_win && is_chrome_branded) {
static_library("google_apps_feature") { static_library("google_apps_feature") {
sources = [ sources = [
"google_apps/constants.cc",
"google_apps/constants.h",
"google_apps/google_apps_handler.cc", "google_apps/google_apps_handler.cc",
"google_apps/google_apps_handler.h", "google_apps/google_apps_handler.h",
] ]
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "components/nux/email/constants.h" #include "components/nux/constants.h"
#include "base/feature_list.h" #include "base/feature_list.h"
...@@ -11,6 +11,10 @@ namespace nux { ...@@ -11,6 +11,10 @@ namespace nux {
extern const base::Feature kNuxEmailFeature{"NuxEmail", extern const base::Feature kNuxEmailFeature{"NuxEmail",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
extern const base::Feature kNuxGoogleAppsFeature{
"NuxGoogleApps", base::FEATURE_DISABLED_BY_DEFAULT};
extern const char kNuxEmailUrl[] = "chrome://welcome/email"; extern const char kNuxEmailUrl[] = "chrome://welcome/email";
extern const char kNuxGoogleAppsUrl[] = "chrome://welcome/apps";
} // namespace nux } // namespace nux
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef COMPONENTS_NUX_GOOGLE_APPS_CONSTANTS_H_ #ifndef COMPONENTS_NUX_CONSTANTS_H_
#define COMPONENTS_NUX_GOOGLE_APPS_CONSTANTS_H_ #define COMPONENTS_NUX_CONSTANTS_H_
namespace base { namespace base {
struct Feature; struct Feature;
...@@ -11,9 +11,11 @@ struct Feature; ...@@ -11,9 +11,11 @@ struct Feature;
namespace nux { namespace nux {
extern const base::Feature kNuxEmailFeature;
extern const base::Feature kNuxGoogleAppsFeature; extern const base::Feature kNuxGoogleAppsFeature;
extern const char kNuxEmailUrl[];
extern const char kNuxGoogleAppsUrl[]; extern const char kNuxGoogleAppsUrl[];
} // namespace nux } // namespace nux
#endif // COMPONENTS_NUX_GOOGLE_APPS_CONSTANTS_H_ #endif // COMPONENTS_NUX_CONSTANTS_H_
// Copyright 2018 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.
#ifndef COMPONENTS_NUX_EMAIL_CONSTANTS_H_
#define COMPONENTS_NUX_EMAIL_CONSTANTS_H_
namespace base {
struct Feature;
} // namespace base
namespace nux {
extern const base::Feature kNuxEmailFeature;
extern const char kNuxEmailUrl[];
} // namespace nux
#endif // COMPONENTS_NUX_EMAIL_CONSTANTS_H_
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "components/favicon/core/favicon_service.h" #include "components/favicon/core/favicon_service.h"
#include "components/grit/components_resources.h" #include "components/grit/components_resources.h"
#include "components/grit/components_scaled_resources.h" #include "components/grit/components_scaled_resources.h"
#include "components/nux/email/constants.h"
#include "components/nux/show_promo_delegate.h" #include "components/nux/show_promo_delegate.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
......
// Copyright 2018 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.
#include "components/nux/google_apps/constants.h"
#include "base/feature_list.h"
namespace nux {
extern const base::Feature kNuxGoogleAppsFeature{
"NuxGoogleApps", base::FEATURE_DISABLED_BY_DEFAULT};
extern const char kNuxGoogleAppsUrl[] = "chrome://welcome/apps";
} // namespace nux
\ No newline at end of file
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "components/favicon/core/favicon_service.h" #include "components/favicon/core/favicon_service.h"
#include "components/grit/components_resources.h" #include "components/grit/components_resources.h"
#include "components/grit/components_scaled_resources.h" #include "components/grit/components_scaled_resources.h"
#include "components/nux/google_apps/constants.h"
#include "components/nux/show_promo_delegate.h" #include "components/nux/show_promo_delegate.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/strings/grit/components_strings.h" #include "components/strings/grit/components_strings.h"
......
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