Hello noel,
I'd like you to do a code review. Please execute
g4 diff -c 11172780
or point your web browser to
http://mondrian/11172780
to review the following code:
Change 11172780 by nigel...@nigeltao-srcwingears2 on 2009/05/19 00:45:38
*pending*
On drag-and-drop on Firefox/Windows (and FF/Mac), check for directories
*after* (not before) we resolve links.
R=noel
[email protected]
DELTA=25 (12 added, 13 deleted, 0 changed)
OCL=11172780
Affected files ...
...
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc#19
edit
...
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_win32.cc#4
edit
25 delta lines: 12 added, 13 deleted, 0 changed
Also consider running:
g4 lint -c 11172780
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 11172780 by nigel...@nigeltao-srcwingears2 on 2009/05/19 00:45:38
*pending*
On drag-and-drop on Firefox/Windows (and FF/Mac), check for directories
*after* (not before) we resolve links.
Affected files ...
...
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc#19
edit
...
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_win32.cc#4
edit
====
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc#19
-
c:\devel\srcwingears2/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc
2009-05-18 23:27:59.000000000 +1000
+++ googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_ff.cc
2009-05-19 00:42:15.000000000 +1000
@@ -596,16 +596,6 @@
has_files = true;
- PRBool bool_result = false;
- if (NS_FAILED(file->IsDirectory(&bool_result)) || bool_result) {
- filenames.clear();
- break;
- }
- if (NS_FAILED(file->IsSpecial(&bool_result)) || bool_result) {
- filenames.clear();
- break;
- }
-
nsCOMPtr<nsILocalFile> local_file =
do_CreateInstance("@mozilla.org/file/local;1", &nr);
if (NS_FAILED(nr)) { filenames.clear(); break; }
@@ -616,12 +606,24 @@
nr = NS_ERROR_FAILURE;
nsString filename;
+ PRBool bool_result = false;
if (NS_SUCCEEDED(file->IsSymlink(&bool_result)) && bool_result) {
nr = local_file->GetTarget(filename);
} else if (NS_SUCCEEDED(file->IsFile(&bool_result)) && bool_result) {
nr = local_file->GetPath(filename);
}
if (NS_FAILED(nr)) { filenames.clear(); break; }
+
+ bool_result = false;
+ if (NS_FAILED(local_file->IsDirectory(&bool_result)) || bool_result) {
+ filenames.clear();
+ break;
+ }
+ bool_result = false;
+ if (NS_FAILED(local_file->IsSpecial(&bool_result)) || bool_result) {
+ filenames.clear();
+ break;
+ }
filenames.push_back(std::string16(filename.get()));
}
====
//depot/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_win32.cc#4
-
c:\devel\srcwingears2/googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_win32.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_win32.cc
2009-05-18 23:27:59.000000000 +1000
+++ googleclient/gears/opensource/gears/desktop/drag_and_drop_utils_win32.cc
2009-05-19 00:42:23.000000000 +1000
@@ -116,9 +116,6 @@
if (!cached_meta_data_is_valid_) {
cached_meta_data_.Reset();
#if BROWSER_IE
- // TODO(nigeltao): If AddFileDragAndDropData returns false (e.g. the user
- // is dragging Text or a URL), then we will be scanning the files on every
- // event. We should fix that.
cached_meta_data_is_valid_ =
AddFileDragAndDropData(module_environment_.get(), &cached_meta_data_);
#else