Hello andreip,

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

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

to review the following code:

Change 8203250 by [EMAIL PROTECTED] on 2008/09/08 16:27:05 *pending*

        Allows relative URLs for gearsLocationProviderUrls.
        
        R=andreip
        [EMAIL PROTECTED]
        DELTA=11  (5 added, 2 deleted, 4 changed)
        OCL=8203250

Affected files ...

... //depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc#48 
edit
... //depot/googleclient/gears/opensource/gears/sdk/api_geolocation.html#6 edit

11 delta lines: 5 added, 2 deleted, 4 changed

Also consider running:
        g4 lint -c 8203250

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 8203250 by [EMAIL PROTECTED] on 2008/09/08 16:27:05 *pending*

        Allows relative URLs for gearsLocationProviderUrls.

Affected files ...

... //depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc#48 
edit
... //depot/googleclient/gears/opensource/gears/sdk/api_geolocation.html#6 edit

==== //depot/googleclient/gears/opensource/gears/geolocation/geolocation.cc#48 
- 
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/geolocation.cc 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/geolocation/geolocation.cc      
2008-09-08 16:44:09.000000000 +0100
+++ googleclient/gears/opensource/gears/geolocation/geolocation.cc      
2008-09-08 16:25:36.000000000 +0100
@@ -44,10 +44,10 @@
 #include "gears/base/common/module_wrapper.h"
 #include "gears/base/common/permissions_manager.h"
 #include "gears/base/common/stopwatch.h"  // For GetCurrentTimeMillis()
+#include "gears/base/common/url_utils.h"  // For ResolveAndNormalize()
 #include "gears/geolocation/location_provider_pool.h"
 #include "gears/geolocation/device_data_provider.h"
 #include "gears/geolocation/geolocation_db.h"
-#include "third_party/googleurl/src/gurl.h"
 
 static const char16 *kDefaultLocationProviderUrl =
     STRING16(L"http://www.google.com/loc/json";);
@@ -466,10 +466,14 @@
     // Check if the url is valid. If not, skip this URL. This also handles the
     // case where the URL is 'GPS', which would confuse the location provider
     // pool.
-    GURL url(urls[i]);
-    if (url.is_valid()) {
+    std::string16 absolute_url;
+    // Form an absolute URL if the supplied URL is relative. This fails if the
+    // URL is not valid.
+    if (ResolveAndNormalize(EnvPageLocationUrl().c_str(),
+                            urls[i].c_str(),
+                            &absolute_url)) {
       LocationProviderBase *network_provider =
-          pool->Register(urls[i],
+          pool->Register(absolute_url,
                          host_name,
                          info->request_address,
                          info->address_language,
==== //depot/googleclient/gears/opensource/gears/sdk/api_geolocation.html#6 - 
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/sdk/api_geolocation.html 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/sdk/api_geolocation.html        
2008-09-08 16:44:09.000000000 +0100
+++ googleclient/gears/opensource/gears/sdk/api_geolocation.html        
2008-09-08 16:42:41.000000000 +0100
@@ -377,8 +377,7 @@
   <td><strong><a name="providerURLs" 
id="providerURLs"></a>gearsLocationProviderUrls</strong></td>
   <td class="odd">readwrite string[]</td>
   <td class="odd">Optional, specifies one or more URLs to contact to convert
-  geolocation signals into positions. Note that these must be complete URLs
-  which include the scheme, e.g.  http://gears.mylocationprovider.com.  If
+  geolocation signals into positions. If
   unset, defaults to a single Google-implemented service. The array can also be
   cleared, or set to null, so that no location providers are used.</td>
 </tr>

Reply via email to