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

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: Rebase. Created 7 years, 7 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 9351f1e4ce05f8b7a15da53ee20b2ec699a3263f..9e35e0573c17ad87f55e616f4a61daebd1c2d0be 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -68,6 +68,9 @@ const char kLocalOnlyFlagName[] = "local_only";
// Key for specifying remote NTP behavior trials.
const char kUseRemoteNTPOnStartupFlagName[] = "use_remote_ntp_on_startup";
+// Key for showing the recent tabs link on the local NTP.
+const char kRecentTabsOnNTPFlagName[] = "show_recent_tabs";
+
// Constants for the field trial name and group prefix.
const char kInstantExtendedFieldTrialName[] = "InstantExtended";
const char kGroupNumberPrefix[] = "Group";
@@ -516,6 +519,18 @@ bool ShouldPreferRemoteNTPOnStartup() {
return false;
}
+bool ShouldShowRecentTabsOnNTP() {
+ FieldTrialFlags flags;
+ if (GetFieldTrialInfo(
+ base::FieldTrialList::FindFullName(kInstantExtendedFieldTrialName),
+ &flags, NULL)) {
+ return GetBoolValueForFlagWithDefault(
+ kRecentTabsOnNTPFlagName, 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/resources/local_ntp/local_ntp.js ('K') | « chrome/browser/search/search.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698