Chromium Code Reviews| 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(); |
| } |