Hello andreip, michaeln,
I'd like you to do a code review. Please execute
g4 diff -c 8463075
or point your web browser to
http://mondrian/8463075
to review the following code:
Change 8463075 by [EMAIL PROTECTED] on 2008/10/02 16:33:18 *pending*
Prevents localserver entries from being deleted on WinCE when a file is
downloaded by the browser for use in another application.
This is to fix a bug when storing video files in the localserver on
WinCE.
Such files are automatically passed to Media Player when visited in the
browser. Currently, a copy of the Gears cache entry is made, playback
begins and the Gears cache entry is deleted.
This fixes the problem by not passing the filename of the Gears cache
entry
to the browser. Currently, the filename is passed to allow file
downloads,
but the WinCE browser does not provide downloads anyway.
Michael, do you know if this change will break any other behaviour?
R=andreip,michaeln
[EMAIL PROTECTED]
DELTA=11 (8 added, 0 deleted, 3 changed)
OCL=8463075
Affected files ...
...
//depot/googleclient/gears/opensource/gears/localserver/ie/http_handler_ie.cc#3
edit
11 delta lines: 8 added, 0 deleted, 3 changed
Also consider running:
g4 lint -c 8463075
which verifies that the changelist doesn't introduce new style violations.
If you can't do the review, please let me know as soon as possible. During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately. Visit
http://www/eng/code_review.html for more information.
This is a semiautomated message from "g4 mail". Complaints or suggestions?
Mail [EMAIL PROTECTED]
Change 8463075 by [EMAIL PROTECTED] on 2008/10/02 16:33:18 *pending*
Prevents localserver entries from being deleted on WinCE when a file is
downloaded by the browser for use in another application.
Affected files ...
...
//depot/googleclient/gears/opensource/gears/localserver/ie/http_handler_ie.cc#3
edit
====
//depot/googleclient/gears/opensource/gears/localserver/ie/http_handler_ie.cc#3
-
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/localserver/ie/http_handler_ie.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/localserver/ie/http_handler_ie.cc
2008-10-02 16:47:11.000000000 +0100
+++ googleclient/gears/opensource/gears/localserver/ie/http_handler_ie.cc
2008-10-02 16:37:43.000000000 +0100
@@ -979,11 +979,19 @@
// The cached_filepath is not provided for head requests
if (!is_head_request_ && !payload_.cached_filepath.empty()) {
+#ifdef WINCE
+ // WinCE does not support user-initiated file downloads from the browser.
+ //
+ // Passing to the browser the filepath to the Gears cache entry can cause
+ // the cache entry to get deleted once it has been read. This has been
+ // observed when Media Player is used by the browser to open the file.
+#else
// One way to support file downloads is to provide a file path, I don't
// know if there are other options?
- hr = CallReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE,
- payload_.cached_filepath.c_str());
- if (FAILED(hr)) return hr;
+ hr = CallReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE,
+ payload_.cached_filepath.c_str());
+ if (FAILED(hr)) return hr;
+#endif
// Report content disposition, including a file path
// TODO(michaeln): a better parser for this header value, perhaps
CAtlRegExp