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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 17226003: Add metrics for interactions with the Apps Launcher promo dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed gyp file. :-/ Created 7 years, 6 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
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index a4753966f315b6cb9a5b3a676d858ecd0902f21d..15d0f19af93de8e908230a157d741b72f469d7bd 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -8,11 +8,9 @@
#include <vector>
#include "apps/app_launcher.h"
-#include "apps/field_trial_names.h"
#include "apps/pref_names.h"
#include "base/command_line.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/metrics/field_trial.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string16.h"
#include "base/strings/string_number_conversions.h"
@@ -338,7 +336,6 @@ void NTPResourceCache::CreateNewTabHTML() {
// Show the profile name in the title and most visited labels if the current
// profile is not the default.
PrefService* prefs = profile_->GetPrefs();
- PrefService* local_state = g_browser_process->local_state();
DictionaryValue load_time_data;
load_time_data.SetBoolean("bookmarkbarattached",
prefs->GetBoolean(prefs::kShowBookmarkBar));
@@ -346,15 +343,8 @@ void NTPResourceCache::CreateNewTabHTML() {
ThemeServiceFactory::GetForProfile(profile_)->HasCustomImage(
IDR_THEME_NTP_ATTRIBUTION));
load_time_data.SetBoolean("showMostvisited", should_show_most_visited_page_);
- std::string app_launcher_promo_group_name =
- base::FieldTrialList::FindFullName(apps::kLauncherPromoTrialName);
- bool show_app_launcher_promo =
- !apps::IsAppLauncherEnabled() &&
- local_state->GetBoolean(apps::prefs::kShowAppLauncherPromo) &&
- (app_launcher_promo_group_name == apps::kShowLauncherPromoOnceGroupName ||
- app_launcher_promo_group_name ==
- apps::kResetShowLauncherPromoPrefGroupName);
- load_time_data.SetBoolean("showAppLauncherPromo", show_app_launcher_promo);
+ load_time_data.SetBoolean("showAppLauncherPromo",
+ apps::ShouldShowAppLauncherPromo());
load_time_data.SetBoolean("showRecentlyClosed",
should_show_recently_closed_menu_);
load_time_data.SetString("title",
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698