summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-25 06:54:43 +0000
committerarv@google.com <arv@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-25 06:54:43 +0000
commit1cf38fa7f9493a4e84a42e05abfc812e19220fea (patch)
treecf767a1a8bc0bd49b35529fa2c2cc7f75900e141
parentfc23ec8dd5f9359914ba6ab1b8bd00c494f547c9 (diff)
downloadchromium_src-1cf38fa7f9493a4e84a42e05abfc812e19220fea.zip
chromium_src-1cf38fa7f9493a4e84a42e05abfc812e19220fea.tar.gz
chromium_src-1cf38fa7f9493a4e84a42e05abfc812e19220fea.tar.bz2
Disable the tips service by default.
Update the UI to not say tips or recommendations. BUG=None TEST=Starting chrome should not show any tips byt default Review URL: http://codereview.chromium.org/160138 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21615 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd16
-rw-r--r--chrome/browser/browser_main.cc2
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc16
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h2
-rw-r--r--chrome/browser/resources/new_new_tab.html5
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h2
-rw-r--r--chrome/test/in_process_browser_test.cc5
-rw-r--r--chrome/test/ui/ui_test.cc3
9 files changed, 38 insertions, 17 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 9813ca4..5509ac8 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -3550,6 +3550,22 @@ each locale. -->
desc="Default content of tip box when no tips are available. This is a short advertisement and explanation for the tips and suggestions to come.">
Watch this space for tips and suggestions for better browsing!
</message>
+ <message name="IDS_NEW_TAB_EVEN_MORE_TITLE"
+ desc="Title for the section on the new tab page that is currently empty. In later releases we plan to show web clips and tips and recommendations here.">
+ Even more
+ </message>
+ <message name="IDS_NEW_TAB_EVEN_MORE_CONTENT"
+ desc="Content for the section on the new tab page that is currently empty. In later releases we plan to show web clips and tips and recommendations here. This is intended to be funny!">
+ This space intentionally left blank
+ </message>
+ <message name="IDS_NEW_TAB_SHOW_EVEN_MORE"
+ desc="Menu item text used to show the even more section.">
+ Show even more
+ </message>
+ <message name="IDS_NEW_TAB_HIDE_EVEN_MORE"
+ desc="Menu item text used to hide the even more section.">
+ Hide even more
+ </message>
<message name="IDS_NEW_TAB_DOWNLOADS"
desc="The header text of the recent downloads section.">
Downloads
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 4b938c6..0ffe724 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -745,7 +745,7 @@ int BrowserMain(const MainFunctionParams& parameters) {
profile->InitExtensions();
// Start up the web resource service. This starts loading data after a
// short delay so as not to interfere with startup time.
- if (!parsed_command_line.HasSwitch(switches::kDisableWebResources))
+ if (parsed_command_line.HasSwitch(switches::kEnableWebResources))
profile->InitWebResources();
int result_code = ResultCodes::NORMAL_EXIT;
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index 50f5ec0..deb9683 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -312,9 +312,9 @@ void NewTabHTMLSource::StartDataRequest(const std::string& path,
localized_strings.SetString(L"recentactivities",
l10n_util::GetString(IDS_NEW_TAB_RECENT_ACTIVITIES));
localized_strings.SetString(L"tipsandsuggestions",
- l10n_util::GetString(IDS_NEW_TAB_TIPS));
+ l10n_util::GetString(IDS_NEW_TAB_EVEN_MORE_TITLE));
localized_strings.SetString(L"defaulttipstitle",
- l10n_util::GetString(IDS_NEW_TAB_DEFAULT_TIPS_TITLE));
+ l10n_util::GetString(IDS_NEW_TAB_EVEN_MORE_CONTENT));
localized_strings.SetString(L"downloads",
l10n_util::GetString(IDS_NEW_TAB_DOWNLOADS));
localized_strings.SetString(L"viewfullhistory",
@@ -334,9 +334,9 @@ void NewTabHTMLSource::StartDataRequest(const std::string& path,
localized_strings.SetString(L"hiderecent",
l10n_util::GetString(IDS_NEW_TAB_HIDE_RECENT));
localized_strings.SetString(L"showtips",
- l10n_util::GetString(IDS_NEW_TAB_SHOW_TIPS));
+ l10n_util::GetString(IDS_NEW_TAB_SHOW_EVEN_MORE));
localized_strings.SetString(L"hidetips",
- l10n_util::GetString(IDS_NEW_TAB_HIDE_TIPS));
+ l10n_util::GetString(IDS_NEW_TAB_HIDE_EVEN_MORE));
localized_strings.SetString(L"thumbnailremovednotification",
l10n_util::GetString(IDS_NEW_TAB_THUMBNAIL_REMOVED_NOTIFICATION));
localized_strings.SetString(L"undothumbnailremove",
@@ -1526,7 +1526,7 @@ NewTabUI::NewTabUI(TabContents* contents)
AddMessageHandler((new MostVisitedHandler())->Attach(this));
AddMessageHandler((new RecentlyClosedTabsHandler())->Attach(this));
AddMessageHandler((new MetricsHandler())->Attach(this));
- if (!WebResourcesDisabled())
+ if (WebResourcesEnabled())
AddMessageHandler((new TipsHandler())->Attach(this));
if (UseOldNewTabPage()) {
@@ -1584,7 +1584,7 @@ void NewTabUI::Observe(NotificationType type,
void NewTabUI::RegisterUserPrefs(PrefService* prefs) {
MostVisitedHandler::RegisterUserPrefs(prefs);
ShownSectionsHandler::RegisterUserPrefs(prefs);
- if (!NewTabUI::WebResourcesDisabled())
+ if (NewTabUI::WebResourcesEnabled())
TipsHandler::RegisterUserPrefs(prefs);
}
@@ -1595,7 +1595,7 @@ bool NewTabUI::UseOldNewTabPage() {
}
// static
-bool NewTabUI::WebResourcesDisabled() {
+bool NewTabUI::WebResourcesEnabled() {
const CommandLine* command_line = CommandLine::ForCurrentProcess();
- return command_line->HasSwitch(switches::kDisableWebResources);
+ return command_line->HasSwitch(switches::kEnableWebResources);
}
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index 4149a46..fde0fe2 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -29,7 +29,7 @@ class NewTabUI : public DOMUI,
static bool UseOldNewTabPage();
// Whether we should disable the web resources backend service
- static bool WebResourcesDisabled();
+ static bool WebResourcesEnabled();
private:
void Observe(NotificationType type,
diff --git a/chrome/browser/resources/new_new_tab.html b/chrome/browser/resources/new_new_tab.html
index cb984ec..239d257 100644
--- a/chrome/browser/resources/new_new_tab.html
+++ b/chrome/browser/resources/new_new_tab.html
@@ -258,9 +258,10 @@ logEvent('log start');
</div><div id="tips" class="section">
<h2 i18n-content="tipsandsuggestions"></h2>
<div id="tip-items">
- <div class="tips-title item" jsselect="$this"
+ <div class="item" jsselect="$this"
jsdisplay="!url"
- i18n-content="defaulttipstitle">
+ i18n-content="defaulttipstitle"
+ onclick="window.location='http://en.wikipedia.org/wiki/Intentionally_blank_page'">
</div>
<div class="tips-container item-container">
<a class="item" jsselect="$this"
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 1835ea6..4c321bb 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -486,9 +486,9 @@ const wchar_t kNewTabPage[] = L"new-tab-page";
// Switches back to the old new tab page.
const wchar_t kOldNewTabPage[] = L"old-new-tab-page";
-// Disables the backend service for web resources, used in the new tab page for
+// Enables the backend service for web resources, used in the new tab page for
// loading tips and recommendations from a JSON feed.
-const wchar_t kDisableWebResources[] = L"disable-web-resources";
+const wchar_t kEnableWebResources[] = L"enable-web-resources";
// Disables the default browser check. Useful for UI/browser tests where we want
// to avoid having the default browser info-bar displayed.
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 87d4cd6..6b8e4387 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -181,7 +181,7 @@ extern const wchar_t kForceFieldTestNameAndValue[];
extern const wchar_t kNewTabPage[];
extern const wchar_t kOldNewTabPage[];
-extern const wchar_t kDisableWebResources[];
+extern const wchar_t kEnableWebResources[];
extern const wchar_t kEnableBenchmarking[];
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index 7544b49..36deb0b 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -102,7 +102,10 @@ void InProcessBrowserTest::SetUp() {
if (single_process_)
command_line->AppendSwitch(switches::kSingleProcess);
- command_line->AppendSwitch(switches::kDisableWebResources);
+ // TODO(arv): Reenable once kEnableWebResources is changed back to
+ // kDisableWebResources
+ // http://crbug.com/17725
+ // command_line->AppendSwitch(switches::kEnableWebResources);
command_line->AppendSwitchWithValue(switches::kUserDataDir, user_data_dir);
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 447464f..fd5915b 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -378,7 +378,8 @@ void UITest::LaunchBrowser(const CommandLine& arguments, bool clear_profile) {
command_line.AppendSwitchWithValue(switches::kHomePage,
homepage_);
// Don't try to fetch web resources during UI testing.
- command_line.AppendSwitch(switches::kDisableWebResources);
+ // Reenable once kEnableWebResources is changed back to kDisableWebResources
+ // command_line.AppendSwitch(switches::kEnableWebResources);
#if defined(OS_POSIX)
const char* alternative_userdir = getenv("CHROME_UI_TESTS_USER_DATA_DIR");
#else