summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 22:17:26 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-12 22:17:26 +0000
commitc0d08e0a834e0b9e8c3a367452708f8f1624f721 (patch)
treedb1ba71d6f77c6cdf8778ab3c85e4e01ace8a073 /chrome
parenta5545a2c04a692492362da278c2c0b6215d22f48 (diff)
downloadchromium_src-c0d08e0a834e0b9e8c3a367452708f8f1624f721.zip
chromium_src-c0d08e0a834e0b9e8c3a367452708f8f1624f721.tar.gz
chromium_src-c0d08e0a834e0b9e8c3a367452708f8f1624f721.tar.bz2
Resource cleanup and de-duping
- remove duplicate code between most_visited_handler.cc and top_sites.cc - remove dead code in most_visited_handler.cc - remove duplicate favicon resources - update favicon resources by adding 32x32s resource for NTP stock most visited pages - uniformly refer to PRODUCT_NAME rather than sometimes using "google chrome" in chromium builds on the NTP - consolidate some resources (IDR_CHROME_STORE_PAGE_FAVICON and IDR_WESBTORE_ICON_16 for example) - remove unused thumbnail for webstore (which is slightly distinct from the themes gallery because there's no &category=theme in the URL) as a precursor, I had to add an icon to chrome/app/theme/google_chrome (internal repository) as a cleanup after, I will have to remove an icon from the same BUG=none TEST=trybots; manual Review URL: http://codereview.chromium.org/7342001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92249 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/chromium_strings.grd4
-rw-r--r--chrome/app/generated_resources.grd5
-rw-r--r--chrome/app/google_chrome_strings.grd4
-rw-r--r--chrome/app/theme/chromium/chromium_icon_32.pngbin2867 -> 0 bytes
-rw-r--r--chrome/app/theme/ntp_store_favicon.pngbin700 -> 0 bytes
-rw-r--r--chrome/app/theme/ntp_themes_gallery_favicon.pngbin700 -> 0 bytes
-rw-r--r--chrome/app/theme/ntp_welcome_favicon.pngbin586 -> 0 bytes
-rw-r--r--chrome/app/theme/theme_resources.grd18
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc5
-rw-r--r--chrome/browser/first_run/try_chrome_dialog_view.cc2
-rw-r--r--chrome/browser/history/top_sites.cc15
-rw-r--r--chrome/browser/history/top_sites.h6
-rw-r--r--chrome/browser/notifications/desktop_notification_service.cc2
-rw-r--r--chrome/browser/resources/new_tab.js2
-rw-r--r--chrome/browser/resources/ntp/most_visited.js2
-rw-r--r--chrome/browser/resources/ntp4/most_visited_page.js1
-rw-r--r--chrome/browser/resources/ntp4/new_tab.js2
-rw-r--r--chrome/browser/ui/browser_init.cc2
-rw-r--r--chrome/browser/ui/cocoa/keystone_infobar.mm2
-rw-r--r--chrome/browser/ui/gtk/gtk_util.cc2
-rw-r--r--chrome/browser/ui/webui/ntp/most_visited_handler.cc47
-rw-r--r--chrome/browser/ui/webui/ntp/most_visited_handler.h9
22 files changed, 39 insertions, 91 deletions
diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd
index d55c4c5..96bc432 100644
--- a/chrome/app/chromium_strings.grd
+++ b/chrome/app/chromium_strings.grd
@@ -332,6 +332,10 @@ be available for now. -->
desc="Title for the hard-coded thumbnail that represents the Google Chrome Welcome page. This is used on the NTP when there aren't enough thumbnails to show.">
Welcome to Chromium
</message>
+ <message name="IDS_NEW_TAB_THEMES_GALLERY_PAGE_TITLE"
+ desc="Title for the hard coded thumbnail that represents the Themes Gallery page. This is used on the NTP when there aren't enough thumbnails to show.">
+ Chromium Themes Gallery
+ </message>
<if expr="not pp_ifdef('chromeos')">
<message name="IDS_EXTERNAL_PROTOCOL_INFORMATION" desc="General information about what Chrome is trying to do when opening this external protocol">
Chromium needs to launch an external application to handle <ph name="SCHEME">$1<ex>acrobat:</ex></ph> links. The link requested is <ph name="PROTOLINK">$2<ex>acrobat:yourpdf</ex></ph>.
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 63115ef..dd7ce24 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -8160,11 +8160,6 @@ ls' lab.">
desc="Action text for link that closes the first run notification.">
Close
</message>
- <!-- TODO: Should this be something none Chrome for Chromium? -->
- <message name="IDS_NEW_TAB_THEMES_GALLERY_PAGE_TITLE"
- desc="Title for the hard coded thumbnail that represents the Google Chrome Themes Gallery page. This is used on the NTP when there aren't enough thumbnails to show.">
- Google Chrome Themes Gallery
- </message>
<message name="IDS_NEW_TAB_HOME_PAGE_SET_NOTIFICATION"
desc="Notification text to show after the user has made the NTP his/her home page.">
Welcome to your home page!
diff --git a/chrome/app/google_chrome_strings.grd b/chrome/app/google_chrome_strings.grd
index cb6479a..afced03 100644
--- a/chrome/app/google_chrome_strings.grd
+++ b/chrome/app/google_chrome_strings.grd
@@ -318,6 +318,10 @@ Chrome supports. -->
desc="Title for the hard-coded thumbnail that represents the Google Chrome Welcome page. This is used on the NTP when there aren't enough thumbnails to show.">
Welcome to Google Chrome
</message>
+ <message name="IDS_NEW_TAB_THEMES_GALLERY_PAGE_TITLE"
+ desc="Title for the hard coded thumbnail that represents the Themes Gallery page. This is used on the NTP when there aren't enough thumbnails to show.">
+ Google Chrome Themes Gallery
+ </message>
<if expr="not pp_ifdef('chromeos')">
<message name="IDS_EXTERNAL_PROTOCOL_INFORMATION" desc="General information about what Chrome is trying to do when opening this external protocol">
Google Chrome needs to launch an external application to handle <ph name="SCHEME">$1<ex>acrobat:</ex></ph> links. The link requested is <ph name="PROTOLINK">$2<ex>acrobat:yourpdf</ex></ph>.
diff --git a/chrome/app/theme/chromium/chromium_icon_32.png b/chrome/app/theme/chromium/chromium_icon_32.png
deleted file mode 100644
index 9fcfe55..0000000
--- a/chrome/app/theme/chromium/chromium_icon_32.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/ntp_store_favicon.png b/chrome/app/theme/ntp_store_favicon.png
deleted file mode 100644
index bdde7bd..0000000
--- a/chrome/app/theme/ntp_store_favicon.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/ntp_themes_gallery_favicon.png b/chrome/app/theme/ntp_themes_gallery_favicon.png
deleted file mode 100644
index bdde7bd..0000000
--- a/chrome/app/theme/ntp_themes_gallery_favicon.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/ntp_welcome_favicon.png b/chrome/app/theme/ntp_welcome_favicon.png
deleted file mode 100644
index d7f88be..0000000
--- a/chrome/app/theme/ntp_welcome_favicon.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd
index ca7ffa07..af9088b 100644
--- a/chrome/app/theme/theme_resources.grd
+++ b/chrome/app/theme/theme_resources.grd
@@ -152,15 +152,11 @@
<include name="IDR_NEWTAB_BUTTON_H" file="newtab_h.png" type="BINDATA" />
<include name="IDR_NEWTAB_BUTTON_MASK" file="newtab_button_mask.png" type="BINDATA" />
<include name="IDR_NEWTAB_BUTTON_P" file="newtab_p.png" type="BINDATA" />
- <include name="IDR_NEWTAB_CHROME_STORE_PAGE_FAVICON" file="ntp_store_favicon.png" type="BINDATA" />
- <include name="IDR_NEWTAB_CHROME_STORE_PAGE_THUMBNAIL" file="ntp_store_thumb.png" type="BINDATA" />
- <include name="IDR_NEWTAB_CHROME_WELCOME_PAGE_FAVICON" file="ntp_welcome_favicon.png" type="BINDATA" />
<include name="IDR_NEWTAB_CHROME_WELCOME_PAGE_THUMBNAIL" file="ntp_welcome_thumb.png" type="BINDATA" />
<include name="IDR_NEWTAB_MENU_MASK" file="ntp_menu_mask.png" type="BINDATA" />
<include name="IDR_NEWTAB_OPTION" file="ntp_option.png" type="BINDATA" />
<include name="IDR_NEWTAB_OPTION_H" file="ntp_option_h.png" type="BINDATA" />
<include name="IDR_NEWTAB_OPTION_P" file="ntp_option_p.png" type="BINDATA" />
- <include name="IDR_NEWTAB_THEMES_GALLERY_FAVICON" file="ntp_themes_gallery_favicon.png" type="BINDATA" />
<include name="IDR_NEWTAB_THEMES_GALLERY_THUMBNAIL" file="ntp_themes_gallery_thumb.png" type="BINDATA" />
<include name="IDR_OMNIBOX_EXTENSION_APP" file="omnibox_extension_app.png" type="BINDATA" />
<include name="IDR_OMNIBOX_EXTENSION_APP_DARK" file="omnibox_extension_app_dark.png" type="BINDATA" />
@@ -192,19 +188,19 @@
<include name="IDR_PRERENDER_FAIL_ICON" file="prerender_fail_icon.png" type="BINDATA"/>
<include name="IDR_PRERENDER_SUCCEED_ICON" file="prerender_succeed_icon.png" type="BINDATA"/>
<if expr="pp_ifdef('_google_chrome')">
- <include name="IDR_PRODUCT_ICON_32" file="google_chrome/google_chrome_icon_32.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO" file="google_chrome/product_logo.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_16" file="google_chrome/product_logo_16.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_26" file="google_chrome/product_logo_26.png" type="BINDATA" />
+ <include name="IDR_PRODUCT_LOGO_32" file="google_chrome/product_logo_32.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_64" file="google_chrome/product_logo_64.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_WHITE" file="google_chrome/product_logo_white.png" type="BINDATA" />
</if>
<if expr="not pp_ifdef('_google_chrome')">
- <include name="IDR_PRODUCT_ICON_32" file="chromium/chromium_icon_32.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO" file="chromium/product_logo.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_WHITE" file="chromium/product_logo_white.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_16" file="chromium/product_logo_16.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_26" file="chromium/product_logo_26.png" type="BINDATA" />
+ <include name="IDR_PRODUCT_LOGO_32" file="chromium/product_logo_32.png" type="BINDATA" />
<include name="IDR_PRODUCT_LOGO_64" file="chromium/product_logo_64.png" type="BINDATA" />
</if>
<!-- NOTE: product_logo_*.* files beyond what's listed above are
@@ -362,16 +358,14 @@
<if expr="pp_ifdef('_google_chrome')">
<include name="IDR_WEBSTORE_ICON" file="google_chrome/webstore_icon.png" type="BINDATA" />
<include name="IDR_WEBSTORE_ICON_16" file="google_chrome/webstore_icon_16.png" type="BINDATA" />
- </if>
- <if expr="not pp_ifdef('_google_chrome')">
- <include name="IDR_WEBSTORE_ICON" file="chromium/webstore_icon.png" type="BINDATA" />
- <include name="IDR_WEBSTORE_ICON_16" file="chromium/webstore_icon_16.png" type="BINDATA" />
- </if>
- <if expr="pp_ifdef('_google_chrome')">
+ <include name="IDR_WEBSTORE_ICON_32" file="google_chrome/webstore_icon_32.png" type="BINDATA" />
<include name="IDR_WIZARD_ICON" file="google_chrome/wizard_icon.png" type="BINDATA" />
<include name="IDR_WIZARD_ICON_RTL" file="google_chrome/wizard_icon_rtl.png" type="BINDATA" />
</if>
<if expr="not pp_ifdef('_google_chrome')">
+ <include name="IDR_WEBSTORE_ICON" file="chromium/webstore_icon.png" type="BINDATA" />
+ <include name="IDR_WEBSTORE_ICON_16" file="chromium/webstore_icon_16.png" type="BINDATA" />
+ <include name="IDR_WEBSTORE_ICON_32" file="chromium/webstore_icon_32.png" type="BINDATA" />
<include name="IDR_WIZARD_ICON" file="chromium/wizard_icon.png" type="BINDATA" />
<include name="IDR_WIZARD_ICON_RTL" file="chromium/wizard_icon_rtl.png" type="BINDATA" />
</if>
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 45a50f1..38d001c 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -32,6 +32,7 @@
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "chrome/browser/extensions/extension_updater.h"
+#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/metrics/metric_event_duration_details.h"
#include "chrome/browser/notifications/balloon.h"
@@ -2044,10 +2045,10 @@ NTPInfoObserver::NTPInfoObserver(
// Add default site URLs.
ListValue* default_sites_list = new ListValue;
- std::vector<GURL> urls = MostVisitedHandler::GetPrePopulatedUrls();
+ history::MostVisitedURLList urls = history::TopSites::GetPrepopulatePages();
for (size_t i = 0; i < urls.size(); ++i) {
default_sites_list->Append(Value::CreateStringValue(
- urls[i].possibly_invalid_spec()));
+ urls[i].url.possibly_invalid_spec()));
}
ntp_info_->Set("default_sites", default_sites_list);
diff --git a/chrome/browser/first_run/try_chrome_dialog_view.cc b/chrome/browser/first_run/try_chrome_dialog_view.cc
index 501cff7..db9757a 100644
--- a/chrome/browser/first_run/try_chrome_dialog_view.cc
+++ b/chrome/browser/first_run/try_chrome_dialog_view.cc
@@ -63,7 +63,7 @@ TryChromeDialogView::Result TryChromeDialogView::ShowModal(
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
views::ImageView* icon = new views::ImageView();
- icon->SetImage(*rb.GetNativeImageNamed(IDR_PRODUCT_ICON_32));
+ icon->SetImage(*rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_32));
gfx::Size icon_size = icon->GetPreferredSize();
// An approximate window size. After Layout() we'll get better bounds.
diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc
index 0ab324b..d0e3619 100644
--- a/chrome/browser/history/top_sites.cc
+++ b/chrome/browser/history/top_sites.cc
@@ -59,9 +59,13 @@ static const int kPrepopulatePageIDs[] =
{ IDS_CHROME_WELCOME_URL, IDS_THEMES_GALLERY_URL };
// Favicons of the sites we force into top sites.
-static const char kPrepopulateFaviconURLs[][54] =
- { "chrome://theme/IDR_NEWTAB_CHROME_WELCOME_PAGE_FAVICON",
- "chrome://theme/IDR_NEWTAB_THEMES_GALLERY_FAVICON" };
+static const char kPrepopulateFaviconURLs[][100] =
+ { "chrome://theme/IDR_PRODUCT_LOGO_16",
+ "chrome://theme/IDR_WEBSTORE_ICON_16" };
+// Same as above, but for NTP4. TODO(estade): remove the above.
+static const char kNewPrepopulateFaviconURLs[][100] =
+ { "chrome://theme/IDR_PRODUCT_LOGO_32",
+ "chrome://theme/IDR_WEBSTORE_ICON_32" };
static const int kPrepopulateTitleIDs[] =
{ IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE,
@@ -652,7 +656,10 @@ MostVisitedURLList TopSites::GetPrepopulatePages() {
MostVisitedURL& url = urls[i];
url.url = GURL(l10n_util::GetStringUTF8(kPrepopulatePageIDs[i]));
url.redirects.push_back(url.url);
- url.favicon_url = GURL(kPrepopulateFaviconURLs[i]);
+ url.favicon_url =
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewTabPage4) ?
+ GURL(kNewPrepopulateFaviconURLs[i]) :
+ GURL(kPrepopulateFaviconURLs[i]);
url.title = l10n_util::GetStringUTF16(kPrepopulateTitleIDs[i]);
}
return urls;
diff --git a/chrome/browser/history/top_sites.h b/chrome/browser/history/top_sites.h
index fc99b28..fc508246 100644
--- a/chrome/browser/history/top_sites.h
+++ b/chrome/browser/history/top_sites.h
@@ -170,6 +170,9 @@ class TopSites
// TopSites isn't loaded yet.
virtual bool IsFull();
+ // Returns the set of prepopulate pages.
+ static MostVisitedURLList GetPrepopulatePages();
+
protected:
// For allowing inheritance.
virtual ~TopSites();
@@ -243,9 +246,6 @@ class TopSites
static int GetRedirectDistanceForURL(const MostVisitedURL& most_visited,
const GURL& url);
- // Returns the set of prepopulate pages.
- static MostVisitedURLList GetPrepopulatePages();
-
// Add prepopulated pages: 'welcome to Chrome' and themes gallery to |urls|.
// Returns true if any pages were added.
static bool AddPrepopulatedPages(MostVisitedURLList* urls);
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index f897361..29dff9d 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -159,7 +159,7 @@ NotificationPermissionInfoBarDelegate::
gfx::Image* NotificationPermissionInfoBarDelegate::GetIcon() const {
return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
- IDR_PRODUCT_ICON_32);
+ IDR_PRODUCT_LOGO_32);
}
InfoBarDelegate::Type
diff --git a/chrome/browser/resources/new_tab.js b/chrome/browser/resources/new_tab.js
index 148dcb1..849e16d 100644
--- a/chrome/browser/resources/new_tab.js
+++ b/chrome/browser/resources/new_tab.js
@@ -1438,7 +1438,7 @@ var mostVisited = new MostVisited(
useSmallGrid(),
shownSections & Section.THUMB);
-function setMostVisitedPages(data, firstRun, hasBlacklistedUrls) {
+function setMostVisitedPages(data, hasBlacklistedUrls) {
logEvent('received most visited pages');
mostVisited.updateSettingsLink(hasBlacklistedUrls);
diff --git a/chrome/browser/resources/ntp/most_visited.js b/chrome/browser/resources/ntp/most_visited.js
index 0978f8c..f19d8cf 100644
--- a/chrome/browser/resources/ntp/most_visited.js
+++ b/chrome/browser/resources/ntp/most_visited.js
@@ -136,7 +136,7 @@ var MostVisited = (function() {
// Send 'getMostVisitedPages' with a callback since we want to find the
// new page and add that in the place of the removed page.
chromeSend('getMostVisited', [], 'setMostVisitedPages',
- function(data, firstRun, hasBlacklistedUrls) {
+ function(data, hasBlacklistedUrls) {
// Update settings link.
self.updateSettingsLink(hasBlacklistedUrls);
diff --git a/chrome/browser/resources/ntp4/most_visited_page.js b/chrome/browser/resources/ntp4/most_visited_page.js
index 4e89c12..d88770c 100644
--- a/chrome/browser/resources/ntp4/most_visited_page.js
+++ b/chrome/browser/resources/ntp4/most_visited_page.js
@@ -224,7 +224,6 @@ cr.define('ntp4', function() {
initialize: function() {
this.classList.add('most-visited-page');
-
this.data_ = null;
this.mostVisitedTiles_ = this.getElementsByClassName('most-visited real');
},
diff --git a/chrome/browser/resources/ntp4/new_tab.js b/chrome/browser/resources/ntp4/new_tab.js
index 7a6c920..f6dc354 100644
--- a/chrome/browser/resources/ntp4/new_tab.js
+++ b/chrome/browser/resources/ntp4/new_tab.js
@@ -547,7 +547,7 @@ cr.define('ntp4', function() {
$('recently-closed-menu-button').dataItems = dataItems;
}
- function setMostVisitedPages(data, firstRun, hasBlacklistedUrls) {
+ function setMostVisitedPages(data, hasBlacklistedUrls) {
mostVisitedPage.data = data;
}
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index 675ff14..e91aac0 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -192,7 +192,7 @@ bool DefaultBrowserInfoBarDelegate::ShouldExpire(
gfx::Image* DefaultBrowserInfoBarDelegate::GetIcon() const {
return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
- IDR_PRODUCT_ICON_32);
+ IDR_PRODUCT_LOGO_32);
}
string16 DefaultBrowserInfoBarDelegate::GetMessageText() const {
diff --git a/chrome/browser/ui/cocoa/keystone_infobar.mm b/chrome/browser/ui/cocoa/keystone_infobar.mm
index c999411..fd1ba9f 100644
--- a/chrome/browser/ui/cocoa/keystone_infobar.mm
+++ b/chrome/browser/ui/cocoa/keystone_infobar.mm
@@ -89,7 +89,7 @@ bool KeystonePromotionInfoBarDelegate::ShouldExpire(
gfx::Image* KeystonePromotionInfoBarDelegate::GetIcon() const {
return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
- IDR_PRODUCT_ICON_32);
+ IDR_PRODUCT_LOGO_32);
}
string16 KeystonePromotionInfoBarDelegate::GetMessageText() const {
diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc
index ff9604b..c366664 100644
--- a/chrome/browser/ui/gtk/gtk_util.cc
+++ b/chrome/browser/ui/gtk/gtk_util.cc
@@ -134,7 +134,7 @@ GList* GetIconList() {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
GList* icon_list = NULL;
icon_list = g_list_append(icon_list,
- rb.GetNativeImageNamed(IDR_PRODUCT_ICON_32));
+ rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_32));
icon_list = g_list_append(icon_list,
rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_16));
return icon_list;
diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
index 6b539c8..98446f2 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc
+++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
@@ -121,11 +121,9 @@ void MostVisitedHandler::SendPagesValue() {
history::TopSites* ts = profile->GetTopSites();
if (ts)
has_blacklisted_urls = ts->HasBlacklistedItems();
- FundamentalValue first_run(IsFirstRun());
FundamentalValue has_blacklisted_urls_value(has_blacklisted_urls);
web_ui_->CallJavascriptFunction("setMostVisitedPages",
*(pages_value_.get()),
- first_run,
has_blacklisted_urls_value);
pages_value_.reset();
}
@@ -314,41 +312,6 @@ void MostVisitedHandler::OnMostVisitedURLsAvailable(
}
}
-bool MostVisitedHandler::IsFirstRun() {
- // If we found no pages we treat this as the first run.
- bool first_run = NewTabUI::NewTabHTMLSource::first_run() &&
- pages_value_->GetSize() ==
- MostVisitedHandler::GetPrePopulatedPages().size();
- // but first_run should only be true once.
- NewTabUI::NewTabHTMLSource::set_first_run(false);
- return first_run;
-}
-
-// static
-const std::vector<MostVisitedHandler::MostVisitedPage>&
- MostVisitedHandler::GetPrePopulatedPages() {
- // TODO(arv): This needs to get the data from some configurable place.
- // http://crbug.com/17630
- static std::vector<MostVisitedPage> pages;
- if (pages.empty()) {
- MostVisitedPage welcome_page = {
- l10n_util::GetStringUTF16(IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE),
- GURL(l10n_util::GetStringUTF8(IDS_CHROME_WELCOME_URL)),
- GURL("chrome://theme/IDR_NEWTAB_CHROME_WELCOME_PAGE_THUMBNAIL"),
- GURL("chrome://theme/IDR_NEWTAB_CHROME_WELCOME_PAGE_FAVICON")};
- pages.push_back(welcome_page);
-
- MostVisitedPage gallery_page = {
- l10n_util::GetStringUTF16(IDS_NEW_TAB_THEMES_GALLERY_PAGE_TITLE),
- GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
- GURL("chrome://theme/IDR_NEWTAB_THEMES_GALLERY_THUMBNAIL"),
- GURL("chrome://theme/IDR_NEWTAB_THEMES_GALLERY_FAVICON")};
- pages.push_back(gallery_page);
- }
-
- return pages;
-}
-
void MostVisitedHandler::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
@@ -376,13 +339,3 @@ void MostVisitedHandler::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedPinnedURLs,
PrefService::UNSYNCABLE_PREF);
}
-
-// static
-std::vector<GURL> MostVisitedHandler::GetPrePopulatedUrls() {
- const std::vector<MostVisitedPage> pages =
- MostVisitedHandler::GetPrePopulatedPages();
- std::vector<GURL> page_urls;
- for (size_t i = 0; i < pages.size(); ++i)
- page_urls.push_back(pages[i].url);
- return page_urls;
-}
diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.h b/chrome/browser/ui/webui/ntp/most_visited_handler.h
index bad04c3..adc8afb 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_handler.h
+++ b/chrome/browser/ui/webui/ntp/most_visited_handler.h
@@ -74,10 +74,6 @@ class MostVisitedHandler : public WebUIMessageHandler,
static void RegisterUserPrefs(PrefService* prefs);
- // Returns a vector containing the urls for the prepopulated pages.
- // Used only in testing.
- static std::vector<GURL> GetPrePopulatedUrls();
-
private:
struct MostVisitedPage;
@@ -107,11 +103,6 @@ class MostVisitedHandler : public WebUIMessageHandler,
// Sends pages_value_ to the javascript side to and resets page_value_.
void SendPagesValue();
- // Returns true if we should treat this as the first run of the new tab page.
- bool IsFirstRun();
-
- static const std::vector<MostVisitedPage>& GetPrePopulatedPages();
-
NotificationRegistrar registrar_;
// Our consumer for the history service.