Hello michaeln,
I'd like you to do a code review. Please execute
g4 diff -c 8223233
or point your web browser to
http://mondrian/8223233
to review the following code:
Change 8223233 by [EMAIL PROTECTED] on 2008/09/09 16:44:56 *pending*
Fix http://code.google.com/p/chromium/issues/detail?id=386. Creating
shortcuts fails when the page title is longer than 64 characters.
R=michaeln
[EMAIL PROTECTED]
DELTA=4 (4 added, 0 deleted, 0 changed)
OCL=8223233
Affected files ...
... //depot/googleclient/gears/opensource/gears/desktop/desktop_cr.cc#1 edit
4 delta lines: 4 added, 0 deleted, 0 changed
Also consider running:
g4 lint -c 8223233
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 8223233 by [EMAIL PROTECTED] on 2008/09/09 16:44:56 *pending*
Fix http://code.google.com/p/chromium/issues/detail?id=386. Creating
shortcuts fails when the page title is longer than 64 characters.
Affected files ...
... //depot/googleclient/gears/opensource/gears/desktop/desktop_cr.cc#1 edit
==== //depot/googleclient/gears/opensource/gears/desktop/desktop_cr.cc#1 -
C:\src\chrome\src\gears/googleclient/gears/opensource/gears/desktop/desktop_cr.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/desktop_cr.cc 2008-09-09
16:45:36.000000000 -0700
+++ googleclient/gears/opensource/gears/desktop/desktop_cr.cc 2008-09-09
16:37:45.000000000 -0700
@@ -27,6 +27,7 @@
#include "gears/base/chrome/browsing_context_cr.h"
#include "gears/base/chrome/module_cr.h"
+#include "gears/base/common/paths.h"
#include "gears/base/common/string_utils.h"
#include "gears/desktop/desktop.h"
#include "gears/ui/common/html_dialog.h"
@@ -144,7 +145,10 @@
return false;
}
+ // Make sure we pass validation on the shortcut name.
EnsureStringValidPathComponent(shortcut_info_.app_name, false);
+ if (shortcut_info_.app_name.length() > kUserPathComponentMaxChars)
+ shortcut_info_.app_name.resize(kUserPathComponentMaxChars);
// Only allow one dialog for this URL.
if (g_open_shortcuts_dialogs &&