Hello andreip,
I'd like you to do a code review. Please execute
g4 diff -c 8338132
or point your web browser to
http://mondrian/8338132
to review the following code:
Change 8338132 by [EMAIL PROTECTED] on 2008/09/22 13:01:20 *pending*
Updates names of Geolocation accuracy fields in JSON protocol.
R=andreip
[EMAIL PROTECTED]
DELTA=21 (2 added, 4 deleted, 15 changed)
OCL=8338132
Affected files ...
...
//depot/googleclient/gears/opensource/gears/geolocation/network_location_request.cc#28
edit
...
//depot/googleclient/gears/opensource/gears/sdk/geolocation_network_protocol.html#3
edit
...
//depot/googleclient/gears/opensource/gears/test/testcases/cgi/location_provider.py#3
edit
...
//depot/googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js#1
edit
21 delta lines: 2 added, 4 deleted, 15 changed
Also consider running:
g4 lint -c 8338132
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 8338132 by [EMAIL PROTECTED] on 2008/09/22 13:01:20 *pending*
Updates names of Geolocation accuracy fields in JSON protocol.
Affected files ...
...
//depot/googleclient/gears/opensource/gears/geolocation/network_location_request.cc#28
edit
...
//depot/googleclient/gears/opensource/gears/sdk/geolocation_network_protocol.html#3
edit
...
//depot/googleclient/gears/opensource/gears/test/testcases/cgi/location_provider.py#3
edit
...
//depot/googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js#1
edit
====
//depot/googleclient/gears/opensource/gears/geolocation/network_location_request.cc#28
-
c:\MyDocs\Gears3/googleclient/gears/opensource/gears/geolocation/network_location_request.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/geolocation/network_location_request.cc
2008-09-24 16:14:35.000000000 +0100
+++ googleclient/gears/opensource/gears/geolocation/network_location_request.cc
2008-09-24 15:58:36.000000000 +0100
@@ -32,12 +32,14 @@
#include "third_party/jsoncpp/value.h"
#include "third_party/jsoncpp/writer.h"
-static const char *kGearsNetworkLocationProtocolVersion = "1.0.2";
+static const char *kGearsNetworkLocationProtocolVersion = "1.1.0";
static const char *kAccessTokenString = "access_token";
static const char *kLatitudeString = "latitude";
static const char *kLongitudeString = "longitude";
static const char *kAltitudeString = "altitude";
+static const char *kAccuracyString = "accuracy";
+static const char *kAltitudeAccuracyString = "altitude_accuracy";
// Note that the corresponding JavaScript Position property is 'gearsAddress'.
static const char *kAddressString = "address";
static const char *kStreetNumberString = "street_number";
@@ -49,10 +51,6 @@
static const char *kCountryString = "country";
static const char *kCountryCodeString = "country_code";
static const char *kPostalCodeString = "postal_code";
-// TODO(steveblock): Consider updating JSON protocol field names to match those
-// used in W3C spec.
-static const char *kAccuracyString = "horizontal_accuracy";
-static const char *kAltitudeAccuracyString = "vertical_accuracy";
// Local functions
static const char16* RadioTypeToString(RadioType type);
====
//depot/googleclient/gears/opensource/gears/sdk/geolocation_network_protocol.html#3
-
c:\MyDocs\Gears3/googleclient/gears/opensource/gears/sdk/geolocation_network_protocol.html
====
# action=edit type=text
--- googleclient/gears/opensource/gears/sdk/geolocation_network_protocol.html
2008-09-24 16:14:35.000000000 +0100
+++ googleclient/gears/opensource/gears/sdk/geolocation_network_protocol.html
2008-09-24 15:58:13.000000000 +0100
@@ -86,7 +86,7 @@
<pre><code>
{
- "version": "1.0.2",
+ "version": "1.1.0",
"host": "maps.google.com",
"access_token": "2:k7j3G6LaL6u_lafw:4iXOeOpTh1glSXe",
"home_mobile_country_code": 310,
@@ -142,8 +142,8 @@
"latitude": 51.0,
"longitude": -0.1,
"altitude": 30.1,
- "horizontal_accuracy": 1200.4,
- "vertical_accuracy": 10.6,
+ "accuracy": 1200.4,
+ "altitude_accuracy": 10.6,
"address": {
"street_number": "100",
"street": "Amphibian Walkway",
@@ -172,7 +172,7 @@
</tr>
<tr>
<td class="nameColumn">version</td>
- <td class="descriptionColumn">The protocol version, currently,
"1.0.2".</td>
+ <td class="descriptionColumn">The protocol version, currently,
"1.1.0".</td>
<td class="requiredColumn">Yes</td>
<td class="typeColumn">string</td>
</tr>
@@ -404,14 +404,14 @@
<td class="typeColumn">double</td>
</tr>
<tr>
- <td class="nameColumn">horizontal_accuracy</td>
+ <td class="nameColumn">accuracy</td>
<td class="descriptionColumn">The horizontal accuracy of the fix, in
meters at a 95% confidence level.</td>
<td class="requiredColumn">No</td>
<td class="typeColumn">double</td>
</tr>
<tr>
- <td class="nameColumn">vertical_accuracy</td>
- <td class="descriptionColumn">The vertical accuracy of the fix, in
meters.</td>
+ <td class="nameColumn">altitude_accuracy</td>
+ <td class="descriptionColumn">The accuracy of the altitude, in meters.</td>
<td class="requiredColumn">No</td>
<td class="typeColumn">double</td>
</tr>
====
//depot/googleclient/gears/opensource/gears/test/testcases/cgi/location_provider.py#3
-
c:\MyDocs\Gears3/googleclient/gears/opensource/gears/test/testcases/cgi/location_provider.py
====
# action=edit type=xtext
--- googleclient/gears/opensource/gears/test/testcases/cgi/location_provider.py
2008-09-24 16:14:35.000000000 +0100
+++ googleclient/gears/opensource/gears/test/testcases/cgi/location_provider.py
2008-09-24 15:57:26.000000000 +0100
@@ -116,8 +116,8 @@
"latitude": 51.59,
"longitude": -1.49,
"altitude": 30,
- "horizontal_accuracy": 1200,
- "vertical_accuracy": 10,
+ "accuracy": 1200,
+ "altitude_accuracy": 10,
"address": {
"street_number": "76",
"street": "Buckingham Palace Road",
====
//depot/googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js#1
-
c:\MyDocs\Gears3/googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js
====
# action=edit type=text
---
googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js
2008-09-24 16:14:36.000000000 +0100
+++
googleclient/gears/opensource/gears/test/testcases/internal_geolocation_tests.js
2008-09-24 15:59:54.000000000 +0100
@@ -129,7 +129,7 @@
'}, ' +
'"radio_type" : "gsm", ' +
'"request_address" : true, ' +
- '"version" : "1.0.2", ' +
+ '"version" : "1.1.0", ' +
'"wifi_towers" : [ { ' +
'"age" : 15, ' +
'"channel" : 19, ' +
@@ -166,8 +166,8 @@
'"latitude" : 53.1, ' +
'"longitude" : -0.1, ' +
'"altitude" : 30.1, ' +
- '"horizontal_accuracy" : 1200.1, ' +
- '"vertical_accuracy" : 10.1, ' +
+ '"accuracy" : 1200.1, ' +
+ '"altitude_accuracy" : 10.1, ' +
'"address" : { ' +
'"street_number": "100", ' +
'"street": "Amphibian Walkway", ' +
@@ -210,8 +210,8 @@
'"latitude" : 53, ' +
'"longitude" : 0, ' +
'"altitude" : 30, ' +
- '"horizontal_accuracy" : 1200, ' +
- '"vertical_accuracy" : 10, ' +
+ '"accuracy" : 1200, ' +
+ '"altitude_accuracy" : 10, ' +
'"address" : { ' +
'"street_number": "100", ' +
'"street": "Amphibian Walkway", ' +