Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3188)

Unified Diff: chrome/browser/search/search.cc

Issue 14685004: Add finch flag for rendering a recently closed link on the local ntp. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Respond to comments. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index ba0820034c10d4e72a5531096e2dc58eae104b0b..68693e244effbdbe500e55403889a2d4685ac2d7 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -62,6 +62,9 @@ const char kLocalOnlyFlagName[] = "local_only";
// Key for specifying local NTP behavior trials.
const char kLocalNTPFlagName[] = "local_ntp";
+// Key for showing the recently closed link on the local NTP.
+const char kRecentlyClosedOnNTPFlagName[] = "show_recently_closed";
+
// Constants for the field trial name and group prefix.
const char kInstantExtendedFieldTrialName[] = "InstantExtended";
const char kGroupNumberPrefix[] = "Group";
@@ -493,6 +496,18 @@ bool IsAggressiveLocalNTPFallbackEnabled() {
return false;
}
+bool ShouldShowRecentlyClosedOnNTP() {
+ FieldTrialFlags flags;
+ if (GetFieldTrialInfo(
+ base::FieldTrialList::FindFullName(kInstantExtendedFieldTrialName),
+ &flags, NULL)) {
+ return GetBoolValueForFlagWithDefault(
+ kRecentlyClosedOnNTPFlagName, false, flags);
+ }
+
+ return false;
+}
+
bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url) {
return MatchesOrigin(my_url, other_url) && my_url.path() == other_url.path();
}
« chrome/browser/search/local_ntp_source.cc ('K') | « chrome/browser/search/search.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698