diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-21 22:24:59 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-21 22:24:59 +0000 |
commit | d5e13f5a289d8b4b3ec65f767bd946967df4ef3e (patch) | |
tree | a35e58d5c6174b5f8e9d3dce3c4fc9b19ff7148c | |
parent | 3bc7fe40255b151a450e9b6511e5846bc3dc65e0 (diff) | |
download | chromium_src-d5e13f5a289d8b4b3ec65f767bd946967df4ef3e.zip chromium_src-d5e13f5a289d8b4b3ec65f767bd946967df4ef3e.tar.gz chromium_src-d5e13f5a289d8b4b3ec65f767bd946967df4ef3e.tar.bz2 |
The ChromeFrameAutomationClient::InitiateNavigation method saves the passed in url to its member
even if it disallows the navigation.
Fixed.
Review URL: http://codereview.chromium.org/501128
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35113 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index 6826434..7f88498 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -465,7 +465,7 @@ bool ChromeFrameAutomationClient::Initialize( chrome_launch_params_.profile_name = profile_name; chrome_launch_params_.extra_chrome_arguments = extra_chrome_arguments; chrome_launch_params_.perform_version_check = perform_version_check; - chrome_launch_params_.url = url_; + chrome_launch_params_.url = navigate_after_initialization_ ? GURL() : url_; chrome_launch_params_.incognito_mode = incognito; proxy_factory_->GetAutomationServer( @@ -520,16 +520,17 @@ bool ChromeFrameAutomationClient::InitiateNavigation( if (url.empty()) return false; - url_ = GURL(url); - referrer_ = GURL(referrer); - + GURL parsed_url(url); // Catch invalid URLs early. - if (!url_.is_valid() || !IsValidUrlScheme(UTF8ToWide(url), is_privileged)) { + if (!parsed_url.is_valid() || + !IsValidUrlScheme(UTF8ToWide(url), is_privileged)) { DLOG(ERROR) << "Invalid URL passed to InitiateNavigation: " << url << " is_privileged=" << is_privileged; return false; } + url_ = parsed_url; + referrer_ = GURL(referrer); navigate_after_initialization_ = false; if (is_initialized()) { |