Commit 88137d5a authored by Peter K. Lee's avatar Peter K. Lee Committed by Commit Bot

Use base::FeatureList for FeedbackKit V2

Use base::FeatureList and about:flags to enable V2 feature.
Default for this flag is DISABLED.

Bug: 657076
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I4b5ee8c95a79f533fded6b717efa0dd6c0bae895
Reviewed-on: https://chromium-review.googlesource.com/900543Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Peter Lee <pkl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537860}
parent 968a6a74
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#import "ios/chrome/browser/ui/omnibox/omnibox_clipping_feature.h" #import "ios/chrome/browser/ui/omnibox/omnibox_clipping_feature.h"
#import "ios/chrome/browser/ui/toolbar/public/toolbar_controller_base_feature.h" #import "ios/chrome/browser/ui/toolbar/public/toolbar_controller_base_feature.h"
#include "ios/chrome/browser/ui/ui_feature_flags.h" #include "ios/chrome/browser/ui/ui_feature_flags.h"
#include "ios/chrome/browser/ui/user_feedback_features.h"
#include "ios/chrome/grit/ios_strings.h" #include "ios/chrome/grit/ios_strings.h"
#include "ios/public/provider/chrome/browser/chrome_browser_provider.h" #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
#include "ios/web/public/features.h" #include "ios/web/public/features.h"
...@@ -243,6 +244,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = { ...@@ -243,6 +244,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
{"tab-switcher-tab-grid", flag_descriptions::kTabSwitcherTabGridName, {"tab-switcher-tab-grid", flag_descriptions::kTabSwitcherTabGridName,
flag_descriptions::kTabSwitcherTabGridDescription, flags_ui::kOsIos, flag_descriptions::kTabSwitcherTabGridDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kTabSwitcherTabGrid)}, FEATURE_VALUE_TYPE(kTabSwitcherTabGrid)},
{"feedback-kit-v2", flag_descriptions::kFeedbackKitV2Name,
flag_descriptions::kFeedbackKitV2Description, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kFeedbackKitV2)},
}; };
// Add all switches from experimental flags to |command_line|. // Add all switches from experimental flags to |command_line|.
......
...@@ -49,6 +49,7 @@ bool IsMemoryDebuggingEnabled(); ...@@ -49,6 +49,7 @@ bool IsMemoryDebuggingEnabled();
bool IsStartupCrashEnabled(); bool IsStartupCrashEnabled();
// Whether a new version of FeedbackKit is the preferred feedback UI provider. // Whether a new version of FeedbackKit is the preferred feedback UI provider.
// DEPRECATED: This will be replaced by base::FeatureList kFeedbackKitV2.
bool IsNewFeedbackKitEnabled(); bool IsNewFeedbackKitEnabled();
// Whether the 3rd party keyboard omnibox workaround is enabled. // Whether the 3rd party keyboard omnibox workaround is enabled.
......
...@@ -47,6 +47,9 @@ const char kDragAndDropDescription[] = "Enable support for drag and drop."; ...@@ -47,6 +47,9 @@ const char kDragAndDropDescription[] = "Enable support for drag and drop.";
const char kExternalSearchName[] = "External Search"; const char kExternalSearchName[] = "External Search";
const char kExternalSearchDescription[] = "Enable support for External Search."; const char kExternalSearchDescription[] = "Enable support for External Search.";
const char kFeedbackKitV2Name[] = "FeedbackKit V2";
const char kFeedbackKitV2Description[] = "Enable use of FeedbackKit V2.";
const char kHistoryBatchUpdatesFilterName[] = "History Single Batch Filtering"; const char kHistoryBatchUpdatesFilterName[] = "History Single Batch Filtering";
const char kHistoryBatchUpdatesFilterDescription[] = const char kHistoryBatchUpdatesFilterDescription[] =
"When enabled History inserts and deletes history items in the same " "When enabled History inserts and deletes history items in the same "
......
...@@ -41,6 +41,10 @@ extern const char kDragAndDropDescription[]; ...@@ -41,6 +41,10 @@ extern const char kDragAndDropDescription[];
extern const char kExternalSearchName[]; extern const char kExternalSearchName[];
extern const char kExternalSearchDescription[]; extern const char kExternalSearchDescription[];
// Title and description for the flag to enable use of FeedbackKit V2.
extern const char kFeedbackKitV2Name[];
extern const char kFeedbackKitV2Description[];
// Title and description for the flag to enable History batch filtering. // Title and description for the flag to enable History batch filtering.
extern const char kHistoryBatchUpdatesFilterName[]; extern const char kHistoryBatchUpdatesFilterName[];
extern const char kHistoryBatchUpdatesFilterDescription[]; extern const char kHistoryBatchUpdatesFilterDescription[];
......
...@@ -87,6 +87,8 @@ source_set("feature_flags") { ...@@ -87,6 +87,8 @@ source_set("feature_flags") {
sources = [ sources = [
"ui_feature_flags.cc", "ui_feature_flags.cc",
"ui_feature_flags.h", "ui_feature_flags.h",
"user_feedback_features.cc",
"user_feedback_features.h",
] ]
deps = [ deps = [
"//base", "//base",
......
// 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 "ios/chrome/browser/ui/user_feedback_features.h"
const base::Feature kFeedbackKitV2{"FeedbackKitV2",
base::FEATURE_DISABLED_BY_DEFAULT};
// 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 IOS_CHROME_BROWSER_UI_USER_FEEDBACK_FEATURES_H_
#define IOS_CHROME_BROWSER_UI_USER_FEEDBACK_FEATURES_H_
#include "base/feature_list.h"
// Feature flag to enable FeedbackKit V2
extern const base::Feature kFeedbackKitV2;
#endif // IOS_CHROME_BROWSER_UI_USER_FEEDBACK_FEATURES_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