forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds a feedback source for the split toolbar that identifies whether the feature is enabled. Change-Id: I5a1455c246e9ad5a6a2d36a452a580678fe59dd0 Reviewed-on: https://chromium-review.googlesource.com/1181575 Reviewed-by: Theresa <twellington@chromium.org> Commit-Queue: Matthew Jones <mdjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#584781}
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
chrome/android/java/src/org/chromium/chrome/browser/feedback/DuetFeedbackSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// 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. | ||
|
||
package org.chromium.chrome.browser.feedback; | ||
|
||
import org.chromium.chrome.browser.util.FeatureUtilities; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** Provides whether Duet is enabled for feedback reports. */ | ||
public class DuetFeedbackSource implements FeedbackSource { | ||
private static final String DUET_KEY = "Duet"; | ||
private static final String ENABLED_VALUE = "Enabled"; | ||
private static final String DISABLED_VALUE = "Disabled"; | ||
|
||
private final HashMap<String, String> mMap; | ||
|
||
DuetFeedbackSource() { | ||
mMap = new HashMap<>(1); | ||
mMap.put(DUET_KEY, | ||
FeatureUtilities.isBottomToolbarEnabled() ? ENABLED_VALUE : DISABLED_VALUE); | ||
} | ||
|
||
@Override | ||
public Map<String, String> getFeedback() { | ||
return mMap; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters