Hello nicolasroard,

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

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

to review the following code:

Change 10259022 by andr...@andreip-gearslinux on 2009/02/24 13:10:10 *pending*

        Avoid compiling Desktop API files on Android.
        
        PRESUBMIT=passed
        R=nicolasroard
        [email protected]
        DELTA=20  (18 added, 0 deleted, 2 changed)
        OCL=10259022

Affected files ...

... //depot/googleclient/gears/opensource/gears/Makefile#234 edit
... //depot/googleclient/gears/opensource/gears/base/common/png_utils.cc#1 edit
... //depot/googleclient/gears/opensource/gears/factory/factory_impl.cc#27 edit
... //depot/googleclient/gears/opensource/gears/tools/config.mk#101 edit

20 delta lines: 18 added, 0 deleted, 2 changed

Also consider running:
        g4 lint -c 10259022

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 10259022 by andr...@andreip-gearslinux on 2009/02/24 13:10:10 *pending*

        Avoid compiling Desktop API files on Android.

Affected files ...

... //depot/googleclient/gears/opensource/gears/Makefile#234 edit
... //depot/googleclient/gears/opensource/gears/base/common/png_utils.cc#1 edit
... //depot/googleclient/gears/opensource/gears/factory/factory_impl.cc#27 edit
... //depot/googleclient/gears/opensource/gears/tools/config.mk#101 edit

==== //depot/googleclient/gears/opensource/gears/Makefile#234 - 
/home/andreip/Gears/googleclient/gears/opensource/gears/Makefile ====
# action=edit type=text
--- googleclient/gears/opensource/gears/Makefile        2009-02-24 
12:31:52.000000000 +0000
+++ googleclient/gears/opensource/gears/Makefile        2009-02-24 
13:18:19.000000000 +0000
@@ -374,6 +374,7 @@
 # The Canvas API is not yet enabled in official builds.
 else
 ifneq ($(OS),wince)
+ifneq ($(OS),android)
 THIRD_PARTY_VPATH      += \
                ../third_party/skia/src/core \
                ../third_party/skia/src/images \
@@ -508,6 +509,7 @@
 endif
 endif
 
+endif # not android
 endif # not wince
 endif # OFFICIAL_BUILD
 endif # USING_SKIA
@@ -1310,6 +1312,7 @@
 # The Canvas API is not yet enabled in official builds.
 else
 ifneq ($(OS),wince)
+ifneq ($(OS),android)
 
 $(BROWSER)_VPATH += \
                canvas \
@@ -1322,6 +1325,7 @@
                canvas_rendering_context_2d.cc \
                $(NULL)
 
+endif  # not android
 endif  # not wince
 endif  # OFFICIAL_BUILD
 
@@ -1362,6 +1366,8 @@
 #-----------------------------------------------------------------------------
 # desktop
 
+ifneq ($(OS),android)
+# The Desktop API is disabled on Android
 $(BROWSER)_VPATH += \
                desktop \
                $(NULL)
@@ -1418,6 +1424,7 @@
                $(NULL)
 
 endif # not OFFICIAL_BUILD
+endif # not android
 
 NPAPI_JAVASRCS += \
                DesktopAndroid.java \
@@ -2130,6 +2137,7 @@
 
 ifneq ($(OFFICIAL_BUILD),1)
 ifneq ($(OS),wince)
+ifneq ($(OS),android)
 $(BROWSER)_VPATH += \
                image \
                $(NULL)
@@ -2139,6 +2147,7 @@
                image.cc \
                image_loader.cc \
                $(NULL)
+endif # not android
 endif # not wince
 endif # not OFFICIAL_BUILD
 
==== //depot/googleclient/gears/opensource/gears/base/common/png_utils.cc#1 - 
/home/andreip/Gears/googleclient/gears/opensource/gears/base/common/png_utils.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/png_utils.cc        
2009-02-24 13:21:59.000000000 +0000
+++ googleclient/gears/opensource/gears/base/common/png_utils.cc        
2009-02-24 13:20:51.000000000 +0000
@@ -25,6 +25,10 @@
 
 // This code is based on nsPNGDecoder in Mozilla and PNGImageDecoder in WebKit.
 
+#ifdef OS_ANDROID
+// We do not need this on Android since the Desktop module is not supported.
+#else
+
 #include <assert.h>
 #include "gears/base/common/png_utils.h"
 
@@ -592,3 +596,5 @@
     base_y += local_height;
   }
 }
+
+#endif  // OS_ANDROID
==== //depot/googleclient/gears/opensource/gears/factory/factory_impl.cc#27 - 
/home/andreip/Gears/googleclient/gears/opensource/gears/factory/factory_impl.cc 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/factory/factory_impl.cc 2009-02-23 
11:48:15.000000000 +0000
+++ googleclient/gears/opensource/gears/factory/factory_impl.cc 2009-02-24 
12:52:27.000000000 +0000
@@ -213,9 +213,9 @@
                                    context, &object);
   } else if (module_name == STRING16(L"beta.dummymodule")) {
     CreateModule<GearsDummyModule>(module_environment_.get(), context, 
&object);
-#ifdef OS_WINCE
+#if defined(OS_WINCE) || defined(OS_ANDROID)
   // Furthermore, Canvas, Console and Image are unimplemented for all
-  // browsers on WinCE.
+  // browsers on WinCE and Android.
 #else
   } else if (module_name == STRING16(L"beta.canvas")) {
     CreateModule<GearsCanvas>(module_environment_.get(), context, &object);
==== //depot/googleclient/gears/opensource/gears/tools/config.mk#101 - 
/home/andreip/Gears/googleclient/gears/opensource/gears/tools/config.mk ====
# action=edit type=text
--- googleclient/gears/opensource/gears/tools/config.mk 2009-02-24 
12:31:52.000000000 +0000
+++ googleclient/gears/opensource/gears/tools/config.mk 2009-02-24 
13:09:22.000000000 +0000
@@ -158,6 +158,9 @@
   USING_CLASS_LOADER=0
 # Use SpiderMonkey.
   USING_MOZJS=1
+# Do not use libjpeg, libpng since we don't have Desktop API
+  USING_LIBJPEG=0
+  USING_LIBPNG=0
 endif
 
 MAKEFLAGS += --no-print-directory

Reply via email to