summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 00:11:31 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 00:11:31 +0000
commit0335206c6f082ae5d473441aeb41f42f955fb564 (patch)
treef8eef4ac1dc27551bb10d7c48e6d936b60f63b66
parent2d2de8915f89fa6ea6754e066c5db87c1efd1853 (diff)
downloadchromium_src-0335206c6f082ae5d473441aeb41f42f955fb564.zip
chromium_src-0335206c6f082ae5d473441aeb41f42f955fb564.tar.gz
chromium_src-0335206c6f082ae5d473441aeb41f42f955fb564.tar.bz2
Add warnings around the new tab page command line switch and its use so people
don't get confused and copy this pattern (as happened recently). BUG=none TEST=none Review URL: http://codereview.chromium.org/186018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25282 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc4
-rw-r--r--chrome/common/chrome_switches.cc2
2 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index dfb97ba..25fc33e 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -285,6 +285,10 @@ std::string NewTabHTMLSource::GetCustomNewTabPageFromCommandLine() {
#endif
if (!file_path.empty()) {
+ // Read the file contents in, blocking the UI thread of the browser.
+ // This is for testing purposes only! It is used to test new versions of
+ // the new tab page using a special command line option. Never use this
+ // in a way that will be used by default in product.
std::string file_contents;
if (file_util::ReadFileToString(FilePath(file_path), &file_contents))
return file_contents;
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index b5df3a2..26f6d6d 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -493,6 +493,8 @@ const wchar_t kForceFieldTestNameAndValue[] = L"force-fieldtest";
// Allows the new tab page resource to be loaded from a local HTML file. This
// should be a path to the HTML file that you want to use for the new tab page.
+// It is used for manually testing new versions of the new tab page only,
+// performance will be poor.
const wchar_t kNewTabPage[] = L"new-tab-page";
// Switches back to the old new tab page.