Hello andreip,

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

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

to review the following code:

Change 8719133 by [EMAIL PROTECTED] on 2008/10/24 09:45:37 *pending*

        Makes sure that GPS providers are used in Geolocation only when 
available.
        
        R=andreip
        [EMAIL PROTECTED]
        DELTA=7  (4 added, 0 deleted, 3 changed)
        OCL=8719133

Affected files ...

... //depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc#57 
edit

7 delta lines: 4 added, 0 deleted, 3 changed

Also consider running:
        g4 lint -c 8719133

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 8719133 by [EMAIL PROTECTED] on 2008/10/24 09:45:37 *pending*

        Makes sure that GPS providers are used in Geolocation only when 
available.

Affected files ...

... //depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc#57 
edit

==== //depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc#57 
- 
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/geolocation.cc 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/geolocation/geolocation.cc      
2008-10-20 23:24:38.000000000 +0100
+++ googleclient/gears/opensource/gears/geolocation/geolocation.cc      
2008-10-20 11:42:55.000000000 +0100
@@ -457,7 +457,8 @@
                      info->request_address,
                      STRING16(L""),  // info->address_language,
                      this);
-  // This only succeeds in builds with CCTESTS.
+  // This only succeeds in builds with CCTESTS when
+  // ConfigureGeolocationMockLocationProviderForTest has been called.
   if (mock_provider) {
     info->providers.push_back(mock_provider);
   }
@@ -476,8 +477,10 @@
                        info->request_address && !reverse_geocoder_url.empty(),
                        info->address_language,
                        this);
-    assert(gps_provider);
-    info->providers.push_back(gps_provider);
+    // GPS is not available on all platforms.
+    if (gps_provider) {
+      info->providers.push_back(gps_provider);
+    }
   }
 
   // Network providers
@@ -489,6 +492,7 @@
                        info->request_address,
                        info->address_language,
                        this);
+    // Network providers should always be available.
     assert(network_provider);
     info->providers.push_back(network_provider);
   }

Reply via email to