Hello jianli,
I'd like you to do a code review. Please execute
g4 diff -c 8148792
or point your web browser to
http://mondrian/8148792
(this changelist has been uploaded to Mondrian)
to review the following code:
Change 8148792 by [EMAIL PROTECTED] on 2008/09/01 13:50:12 *pending*
Don't compile notifier on Android.
The notifier API is unofficial and not supported on Android so
far. This fixes a few files which need ifdef OS_ANDROID.
PRESUBMIT=passed
R=jianli
[EMAIL PROTECTED]
DELTA=26 (24 added, 0 deleted, 2 changed)
OCL=8148792
Affected files ...
... //depot/googleclient/gears/opensource/gears/cctests/test.cc#77 edit
... //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#46 edit
... //depot/googleclient/gears/opensource/gears/desktop/desktop_test.cc#1 edit
...
//depot/googleclient/gears/opensource/gears/desktop/notification_message_orderer.cc#1
edit
...
//depot/googleclient/gears/opensource/gears/notifier/notifier_process_linux.cc#9
edit
... //depot/googleclient/gears/opensource/gears/notifier/notifier_proxy.cc#4
edit
26 delta lines: 24 added, 0 deleted, 2 changed
Also consider running:
g4 lint -c 8148792
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 8148792 by [EMAIL PROTECTED] on 2008/09/01 13:50:12 *pending*
Don't compile notifier on Android.
The notifier API is unofficial and not supported on Android so
far. This fixes a few files which need ifdef OS_ANDROID.
Affected files ...
... //depot/googleclient/gears/opensource/gears/cctests/test.cc#77 edit
... //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#46 edit
... //depot/googleclient/gears/opensource/gears/desktop/desktop_test.cc#1 edit
...
//depot/googleclient/gears/opensource/gears/desktop/notification_message_orderer.cc#1
edit
...
//depot/googleclient/gears/opensource/gears/notifier/notifier_process_linux.cc#9
edit
... //depot/googleclient/gears/opensource/gears/notifier/notifier_proxy.cc#4
edit
==== //depot/googleclient/gears/opensource/gears/cctests/test.cc#77 -
/usr/local/google/home/jripley/gears-trunk2/googleclient/gears/opensource/gears/cctests/test.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/cctests/test.cc 2008-08-27
14:31:43.000000000 +0100
+++ googleclient/gears/opensource/gears/cctests/test.cc 2008-09-01
13:42:39.000000000 +0100
@@ -101,7 +101,11 @@
#ifdef OFFICIAL_BUILD
// The notification API has not been finalized for official builds.
#else
+#ifdef OS_ANDROID
+ // The notification API has not been implemented for Android.
+#else
RegisterMethod("testNotifier", &GearsTest::TestNotifier);
+#endif // OS_ANDROID
#endif // OFFICIAL_BUILD
}
@@ -358,7 +362,11 @@
#ifdef OFFICIAL_BUILD
// The notification API has not been finalized for official builds.
#else
+#ifdef OS_ANDROID
+ // The notification API has not been implemented for Android.
+#else
ok &= TestNotificationMessageOrdering(&error);
+#endif // OS_ANDROID
#endif // OFFICIAL_BUILD
// We have to call GetDB again since TestCapabilitiesDBAll deletes
==== //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#46 -
/usr/local/google/home/jripley/gears-trunk2/googleclient/gears/opensource/gears/desktop/desktop.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/desktop.cc 2008-09-01
13:51:16.000000000 +0100
+++ googleclient/gears/opensource/gears/desktop/desktop.cc 2008-09-01
13:44:09.000000000 +0100
@@ -95,7 +95,11 @@
#ifdef OFFICIAL_BUILD
// The notification API has not been finalized for official builds.
#else
+#ifdef OS_ANDROID
+ // The notification API has not been implemented for Android.
+#else
static NotificationMessageOrderer g_notification_message_orderer;
+#endif // OS_ANDROID
#endif // OFFICIAL_BUILD
bool DecodeIcon(Desktop::IconData *icon, int expected_size,
==== //depot/googleclient/gears/opensource/gears/desktop/desktop_test.cc#1 -
/usr/local/google/home/jripley/gears-trunk2/googleclient/gears/opensource/gears/desktop/desktop_test.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/desktop_test.cc 2008-09-01
13:51:16.000000000 +0100
+++ googleclient/gears/opensource/gears/desktop/desktop_test.cc 2008-09-01
13:44:54.000000000 +0100
@@ -27,6 +27,9 @@
#ifdef OFFICIAL_BUILD
// The notification API has not been finalized for official builds.
#else
+#ifdef OS_ANDROID
+ // The notification API has not been implemented for Android.
+#else
#include "gears/desktop/desktop_test.h"
#include <queue>
@@ -287,5 +290,6 @@
return g_ok;
}
+#endif // OS_ANDROID
#endif // OFFICIAL_BUILD
#endif // USING_CCTESTS
====
//depot/googleclient/gears/opensource/gears/desktop/notification_message_orderer.cc#1
-
/usr/local/google/home/jripley/gears-trunk2/googleclient/gears/opensource/gears/desktop/notification_message_orderer.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/notification_message_orderer.cc
2008-09-01 13:51:17.000000000 +0100
+++ googleclient/gears/opensource/gears/desktop/notification_message_orderer.cc
2008-09-01 13:45:01.000000000 +0100
@@ -25,6 +25,9 @@
#ifdef OFFICIAL_BUILD
// The notification API has not been finalized for official builds.
+#else
+#ifdef OS_ANDROID
+ // The notification API has not been implemented for Android.
#else
#include "gears/desktop/notification_message_orderer.h"
@@ -233,4 +236,5 @@
break;
}
}
+#endif // OS_ANDROID
#endif // OFFICIAL_BUILD
====
//depot/googleclient/gears/opensource/gears/notifier/notifier_process_linux.cc#9
-
/usr/local/google/home/jripley/gears-trunk2/googleclient/gears/opensource/gears/notifier/notifier_process_linux.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/notifier/notifier_process_linux.cc
2008-09-01 13:51:17.000000000 +0100
+++ googleclient/gears/opensource/gears/notifier/notifier_process_linux.cc
2008-09-01 13:38:12.000000000 +0100
@@ -26,7 +26,7 @@
#ifdef OFFICIAL_BUILD
// The notification API has not been finalized for official builds.
#else
-#if (defined(LINUX) || defined(OS_ANDROID)) && !defined(OS_MACOSX)
+#if defined(LINUX) && !defined(OS_MACOSX)
#include "gears/notifier/notifier_process.h"
@@ -88,5 +88,5 @@
return NotifierPosixUtils::FindNotifierProcess();
}
-#endif // (defined(LINUX) || defined(OS_ANDROID)) && !defined(OS_MACOSX)
+#endif // defined(LINUX) && !defined(OS_MACOSX)
#endif // OFFICIAL_BUILD
==== //depot/googleclient/gears/opensource/gears/notifier/notifier_proxy.cc#4 -
/usr/local/google/home/jripley/gears-trunk2/googleclient/gears/opensource/gears/notifier/notifier_proxy.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/notifier/notifier_proxy.cc
2008-09-01 13:51:17.000000000 +0100
+++ googleclient/gears/opensource/gears/notifier/notifier_proxy.cc
2008-09-01 13:45:41.000000000 +0100
@@ -26,6 +26,9 @@
#ifdef OFFICIAL_BUILD
// The notification API has not been finalized for official builds.
#else
+#ifdef OS_ANDROID
+ // The notification API has not been implemented for Android.
+#else
#include "gears/notifier/notifier_proxy.h"
@@ -197,4 +200,5 @@
this_ptr->PostNotification(message_type, retried_notification);
}
+#endif // OS_ANDROID
#endif // OFFICIAL_BUILD