Hello mpcomplete,

I'd like you to do a code review.  Please execute
        g4 diff -c 8469672

or point your web browser to
        http://mondrian/8469672

to review the following code:

Change 8469672 by [EMAIL PROTECTED] on 2008/10/02 15:18:19 *pending*

        Switch Chrome build to using the Android version of timers, and fix a 
bug with sync messages.
        
        R=mpcomplete
        [EMAIL PROTECTED]
        DELTA=15  (9 added, 4 deleted, 2 changed)
        OCL=8469672

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/chrome/module_cr.cc#2 edit
... //depot/googleclient/gears/opensource/gears/timer/timer.cc#3 edit
... //depot/googleclient/gears/opensource/gears/timer/timer.h#5 edit

15 delta lines: 9 added, 4 deleted, 2 changed

Also consider running:
        g4 lint -c 8469672

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 8469672 by [EMAIL PROTECTED] on 2008/10/02 15:18:19 *pending*

        Switch Chrome build to using the Android version of timers, and fix a 
bug with sync messages.

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/chrome/module_cr.cc#2 edit
... //depot/googleclient/gears/opensource/gears/timer/timer.cc#3 edit
... //depot/googleclient/gears/opensource/gears/timer/timer.h#5 edit

==== //depot/googleclient/gears/opensource/gears/base/chrome/module_cr.cc#2 - 
c:\src-gears3/googleclient/gears/opensource/gears/base/chrome/module_cr.cc ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/chrome/module_cr.cc        
2008-09-17 14:36:00.000000000 -0700
+++ googleclient/gears/opensource/gears/base/chrome/module_cr.cc        
2008-10-02 15:12:05.000000000 -0700
@@ -463,6 +463,7 @@
 
   AllowNPInit(true);
   AutoUpdateMessage::Register();
+  AutoUpdateSyncMessage::Register();
   UpdateNotifyMessage::Register();
   IsUpdateRunningMessage::Register();
   OfflineModeMessage::Register();
@@ -493,6 +494,10 @@
   virtual void Run() {
     void *buffer;
     uint32 size;
+    if (!CP::browser_funcs().send_sync_message) {
+      return;
+    }
+
     CP::browser_funcs().send_sync_message(g_cpid, &message_[0], 
message_.size(),
                                           &buffer, &size);
     if (retval_ && size) {
@@ -524,10 +529,6 @@
 }
 
 bool PluginSyncMessage::Send() {
-  if (!CP::browser_funcs().send_sync_message) {
-    return false;
-  }
-
   std::vector<uint8> buf;
   Serializer serializer(&buf);
   if (!serializer.WriteObject(this))
@@ -541,6 +542,10 @@
   } else {
     void *buffer;
     uint32 size;
+    if (!CP::browser_funcs().send_sync_message) {
+      return false;
+    }
+
     if (CPERR_SUCCESS != CP::browser_funcs().send_sync_message(g_cpid,
                                                                &buf[0],
                                                                buf.size(),
==== //depot/googleclient/gears/opensource/gears/timer/timer.cc#3 - 
c:\src-gears3/googleclient/gears/opensource/gears/timer/timer.cc ====
# action=edit type=text
--- googleclient/gears/opensource/gears/timer/timer.cc  2008-10-02 
15:16:25.000000000 -0700
+++ googleclient/gears/opensource/gears/timer/timer.cc  2008-10-02 
11:55:44.000000000 -0700
@@ -35,7 +35,7 @@
 
 // TODO(mpcomplete): remove when we have a cross-platform timer abstraction
 #if BROWSER_NPAPI && defined(WIN32)
-#define BROWSER_IE 1
+#define OS_ANDROID 1
 #endif
 
 #if BROWSER_IE
==== //depot/googleclient/gears/opensource/gears/timer/timer.h#5 - 
c:\src-gears3/googleclient/gears/opensource/gears/timer/timer.h ====
# action=edit type=text
--- googleclient/gears/opensource/gears/timer/timer.h   2008-10-02 
15:16:25.000000000 -0700
+++ googleclient/gears/opensource/gears/timer/timer.h   2008-10-02 
12:13:59.000000000 -0700
@@ -43,7 +43,7 @@
 
 // TODO(mpcomplete): remove when we have a cross-platform timer abstraction
 #if BROWSER_NPAPI && defined(WIN32)
-#define BROWSER_IE 1
+#define OS_ANDROID 1
 #endif
 
 // As an implementation detail, on IE we have a single WindowsPlatformTimer

Reply via email to