summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-14 19:54:17 +0000
committerapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-14 19:54:17 +0000
commitf0d441c73741a50c69b0e71908e1de76e5956f41 (patch)
treec24967618c190a15cb191f21cc4f3989cb2152f3 /o3d
parent83f7b12249d4800cdbc9c4f2bbbccb4299b750d4 (diff)
downloadchromium_src-f0d441c73741a50c69b0e71908e1de76e5956f41.zip
chromium_src-f0d441c73741a50c69b0e71908e1de76e5956f41.tar.gz
chromium_src-f0d441c73741a50c69b0e71908e1de76e5956f41.tar.bz2
StreamOperation gets url scheme from full path rather than relative path. Fixes IE.
Review URL: http://codereview.chromium.org/155521 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/plugin/npapi_host_control/win/stream_operation.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/o3d/plugin/npapi_host_control/win/stream_operation.cc b/o3d/plugin/npapi_host_control/win/stream_operation.cc
index a72d1a5..8c0e385 100644
--- a/o3d/plugin/npapi_host_control/win/stream_operation.cc
+++ b/o3d/plugin/npapi_host_control/win/stream_operation.cc
@@ -489,18 +489,7 @@ HRESULT STDMETHODCALLTYPE StreamOperation::OnObjectAvailable(REFIID riid,
HRESULT StreamOperation::OpenURL(NPPluginProxy *owning_plugin,
const wchar_t *url,
void *notify_data) {
- // Validate the URL. If the URL is invalid there is no need to create a new
- // thread only to have it immediately fail.
HRESULT hr;
- URL_COMPONENTS components = { sizeof(URL_COMPONENTS) };
- if (!InternetCrackUrl(url, 0, 0, &components))
- return E_INVALIDARG;
- if (components.nScheme != INTERNET_SCHEME_FILE &&
- components.nScheme != INTERNET_SCHEME_FTP &&
- components.nScheme != INTERNET_SCHEME_HTTP &&
- components.nScheme != INTERNET_SCHEME_HTTPS) {
- return E_INVALIDARG;
- }
// The StreamOperation instance is created with a ref-count of zero,
// so we explicitly attach a CComPtr to the object to boost the count, and
@@ -529,6 +518,18 @@ HRESULT StreamOperation::OpenURL(NPPluginProxy *owning_plugin,
stream_object->SetFullURL(full_path);
+ // Validate the URL. If the URL is invalid there is no need to create a new
+ // thread only to have it immediately fail.
+ URL_COMPONENTS components = { sizeof(URL_COMPONENTS) };
+ if (!InternetCrackUrl(full_path, 0, 0, &components))
+ return E_INVALIDARG;
+ if (components.nScheme != INTERNET_SCHEME_FILE &&
+ components.nScheme != INTERNET_SCHEME_FTP &&
+ components.nScheme != INTERNET_SCHEME_HTTP &&
+ components.nScheme != INTERNET_SCHEME_HTTPS) {
+ return E_INVALIDARG;
+ }
+
// Create an object window on this thread that will be sent messages when
// something happens on the worker thread.
HWND temporary_window = stream_object->Create(HWND_DESKTOP);