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

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: 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
« chrome/browser/search/search.h ('K') | « chrome/browser/search/search.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index ba0820034c10d4e72a5531096e2dc58eae104b0b..5a70340579ecd15276de6242f3b9a2af188e084b 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 enabling the recently closed link on the local NTP.
+const char kRecentlyClosedNTPLinkFlagName[] = "recently_closed_ntp_link";
samarth 2013/05/03 04:52:45 show_recently_closed_ntp_link or just show_recentl
jeremycho 2013/05/03 06:30:29 Done.
+
// 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 IsRecentlyClosedNTPLinkEnabled() {
+ FieldTrialFlags flags;
+ if (GetFieldTrialInfo(
+ base::FieldTrialList::FindFullName(kInstantExtendedFieldTrialName),
+ &flags, NULL)) {
+ return GetBoolValueForFlagWithDefault(
+ kRecentlyClosedNTPLinkFlagName, 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/search.h ('K') | « chrome/browser/search/search.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698