summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/tips_handler.h
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 20:55:01 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 20:55:01 +0000
commit90945981628689f5b121afb3c9dc84f4c69cf6c2 (patch)
tree60541facb4c6f5b5d07b4a8bc97e7e1880731686 /chrome/browser/dom_ui/tips_handler.h
parente001d41b9c174084809b80f784811303b1ef04aa (diff)
downloadchromium_src-90945981628689f5b121afb3c9dc84f4c69cf6c2.zip
chromium_src-90945981628689f5b121afb3c9dc84f4c69cf6c2.tar.gz
chromium_src-90945981628689f5b121afb3c9dc84f4c69cf6c2.tar.bz2
Validates links which are to be passed on to the NTP by ensuring that they start with "http://" or "https://".
BUG= http://crbug.com/15457 TEST= Change cached tip link in preferences file to be invalid. Note that this tip will not be included on the NTP. Review URL: http://codereview.chromium.org/149083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/tips_handler.h')
-rw-r--r--chrome/browser/dom_ui/tips_handler.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/dom_ui/tips_handler.h b/chrome/browser/dom_ui/tips_handler.h
index a218e09..7847ba6 100644
--- a/chrome/browser/dom_ui/tips_handler.h
+++ b/chrome/browser/dom_ui/tips_handler.h
@@ -11,10 +11,6 @@
// "tip_cache": {
// "0": {
-// "index": should become time field (or not)
-// "snippet": the text of the item
-// "source": text describing source (i.e., "New York Post")
-// "thumbnail": URL of thumbnail on popgadget server
// "title": text giving title of item
// "url": link to item's page
// },
@@ -43,6 +39,9 @@ class TipsHandler : public DOMMessageHandler {
static void RegisterUserPrefs(PrefService* prefs);
private:
+ // Make sure the string we are pushing to the NTP is a valid URL.
+ bool IsValidURL(const std::wstring& url_string);
+
// So we can push data out to the page that has called this handler.
DOMUI* dom_ui_;