************************* G4 reminder *************************
These new files:
c:\MyDocs\Gears1\googleclient\gears\opensource\gears\geolocation\backoff_manager.cc
are missing unit tests.
***************************************************************
Hello andreip,
I'd like you to do a code review. Please execute
g4 diff -c 8514531
or point your web browser to
http://mondrian/8514531
to review the following code:
Change 8514531 by [EMAIL PROTECTED] on 2008/10/07 17:47:06 *pending*
Adds exponential backoff for network requests to reverse geocoding.
R=andreip
[EMAIL PROTECTED]
DELTA=276 (190 added, 66 deleted, 20 changed)
OCL=8514531
Affected files ...
... //depot/googleclient/gears/opensource/gears/Makefile#190 edit
...
//depot/googleclient/gears/opensource/gears/geolocation/backoff_manager.cc#1 add
... //depot/googleclient/gears/opensource/gears/geolocation/backoff_manager.h#1
add
...
//depot/googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.cc#11
edit
...
//depot/googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.h#5
edit
...
//depot/googleclient/gears/opensource/gears/geolocation/network_location_provider.cc#26
edit
...
//depot/googleclient/gears/opensource/gears/geolocation/reverse_geocoder.cc#2
edit
...
//depot/googleclient/gears/opensource/gears/geolocation/reverse_geocoder.h#1
edit
... //depot/googleclient/gears/opensource/gears/geolocation/timed_callback.cc#4
edit
276 delta lines: 190 added, 66 deleted, 20 changed
Also consider running:
g4 lint -c 8514531
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 8514531 by [EMAIL PROTECTED] on 2008/10/07 17:47:06 *pending*
Adds exponential backoff for network requests to reverse geocoding.
Affected files ...
... //depot/googleclient/gears/opensource/gears/Makefile#190 edit
...
//depot/googleclient/gears/opensource/gears/geolocation/backoff_manager.cc#1 add
... //depot/googleclient/gears/opensource/gears/geolocation/backoff_manager.h#1
add
...
//depot/googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.cc#11
edit
...
//depot/googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.h#5
edit
...
//depot/googleclient/gears/opensource/gears/geolocation/network_location_provider.cc#26
edit
...
//depot/googleclient/gears/opensource/gears/geolocation/reverse_geocoder.cc#2
edit
...
//depot/googleclient/gears/opensource/gears/geolocation/reverse_geocoder.h#1
edit
... //depot/googleclient/gears/opensource/gears/geolocation/timed_callback.cc#4
edit
==== //depot/googleclient/gears/opensource/gears/Makefile#190 -
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/Makefile ====
# action=edit type=text
--- googleclient/gears/opensource/gears/Makefile 2008-10-07
19:10:40.000000000 +0100
+++ googleclient/gears/opensource/gears/Makefile 2008-10-07
18:12:04.000000000 +0100
@@ -2396,7 +2396,8 @@
$(NULL)
$(BROWSER)_CPPSRCS += \
- access_token_manager.cc \
+ access_token_manager.cc \
+ backoff_manager.cc \
empty_device_data_provider.cc \
geolocation.cc \
geolocation_db.cc \
====
//depot/googleclient/gears/opensource/gears/geolocation/backoff_manager.cc#1 -
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/backoff_manager.cc
====
# action=add type=text
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ googleclient/gears/opensource/gears/geolocation/backoff_manager.cc
2008-10-07 17:45:15.000000000 +0100
@@ -0,0 +1,76 @@
+// Copyright 2008, Google Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
notice,
+// this list of conditions and the following disclaimer in the
documentation
+// and/or other materials provided with the distribution.
+// 3. Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "gears/geolocation/backoff_manager.h"
+
+// The baseline minimum period between network requests.
+static const int kBaselineMinimumRequestInterval = 1000 * 5; // 5 seconds
+// The upper limit of the minimum period between network requests.
+static const int kMinimumRequestIntervalLimit = 1000 * 60 * 60 * 3; // 3 hours
+
+
+// static
+BackoffManager::ServerMap BackoffManager::servers_;
+
+// static
+Mutex BackoffManager::servers_mutex_;
+
+// static
+void BackoffManager::ReportRequest(const std::string16 &url) {
+ MutexLock lock(&servers_mutex_);
+ ServerMap::iterator iter = servers_.find(url);
+ if (iter != servers_.end()) {
+ iter->second.first = GetCurrentTimeMillis();
+ } else {
+ servers_[url] = std::make_pair(GetCurrentTimeMillis(),
+ kBaselineMinimumRequestInterval);
+ }
+}
+
+// static
+int64 BackoffManager::ReportResponse(const std::string16 &url,
+ bool server_error) {
+ // Use exponential back-off on server error.
+ MutexLock lock(&servers_mutex_);
+ ServerMap::iterator iter = servers_.find(url);
+ assert(iter != servers_.end());
+ int64 *interval = &iter->second.second;
+ if (server_error) {
+ if (*interval < kMinimumRequestIntervalLimit) {
+ // Increase interval by between 90% and 110%.
+ srand(static_cast<unsigned int>(GetCurrentTimeMillis()));
+ double increment_proportion = 0.9 + 0.2 * rand() / RAND_MAX;
+ int64 increment = static_cast<int64>(*interval * increment_proportion);
+ if (increment > kMinimumRequestIntervalLimit - *interval) {
+ *interval = kMinimumRequestIntervalLimit;
+ } else {
+ *interval += increment;
+ }
+ }
+ } else {
+ *interval = kBaselineMinimumRequestInterval;
+ }
+ return iter->second.first + *interval;
+}
====
//depot/googleclient/gears/opensource/gears/geolocation/backoff_manager.h#1 -
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/backoff_manager.h
====
# action=add type=text
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ googleclient/gears/opensource/gears/geolocation/backoff_manager.h
2008-10-07 17:44:39.000000000 +0100
@@ -0,0 +1,58 @@
+// Copyright 2008, Google Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
notice,
+// this list of conditions and the following disclaimer in the
documentation
+// and/or other materials provided with the distribution.
+// 3. Neither the name of Google Inc. nor the names of its contributors may be
+// used to endorse or promote products derived from this software without
+// specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// The BackoffManager class is used to implement exponential back-off for
+// network requests in case of sever errors. Users report to the BackoffManager
+// class when they make a request to or receive a response from a given url.
The
+// BackoffManager class provides the earliest time at which subsequent requests
+// should be made.
+
+#ifndef GEARS_GEOLOCATION_BACKOFF_MANAGER_H__
+#define GEARS_GEOLOCATION_BACKOFF_MANAGER_H__
+
+#include "gears/base/common/common.h"
+#include "gears/base/common/mutex.h"
+#include "gears/base/common/stopwatch.h" // For GetCurrentTimeMillis
+#include <map>
+
+class BackoffManager {
+ public:
+ static void ReportRequest(const std::string16 &url);
+ static int64 ReportResponse(const std::string16 &url, bool server_error);
+
+ private:
+ // A map from server URL to a pair of integers representing the last request
+ // time and the current minimum interval between requests, both in
+ // milliseconds.
+ typedef std::map<std::string16, std::pair<int64, int64> > ServerMap;
+ static ServerMap servers_;
+
+ // The mutex used to protect the map.
+ static Mutex servers_mutex_;
+
+ DISALLOW_EVIL_CONSTRUCTORS(BackoffManager);
+};
+
+#endif // GEARS_GEOLOCATION_BACKOFF_MANAGER_H__
====
//depot/googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.cc#11
-
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.cc
====
# action=edit type=text
---
googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.cc
2008-10-07 19:10:40.000000000 +0100
+++
googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.cc
2008-10-07 19:04:48.000000000 +0100
@@ -46,6 +46,7 @@
#include <service.h>
#include "gears/base/common/stopwatch.h"
#include "gears/base/common/time_utils_win32.h"
+#include "gears/geolocation/backoff_manager.h"
// Maximum age of GPS data we'll accept.
static const int kGpsDataMaximumAgeMilliseconds = 5 * 1000;
@@ -86,11 +87,12 @@
request_address_(false),
reverse_geocoder_(NULL),
is_reverse_geocode_in_progress_(false),
- is_new_reverse_geocode_required_(false) {
+ is_new_reverse_geocode_required_(false),
+ request_wait_time_timed_callback_(NULL) {
// Initialise member events.
stop_event_.Create(NULL, FALSE, FALSE, NULL);
new_listener_waiting_event_.Create(NULL, FALSE, FALSE, NULL);
- new_reverse_geocode_required_event_.Create(NULL, FALSE, FALSE, NULL);
+ request_wait_time_expired_event_.Create(NULL, FALSE, FALSE, NULL);
// Start the worker thread.
Start();
@@ -167,7 +169,7 @@
new_listener_waiting_event_,
position_update_event,
state_change_event,
- new_reverse_geocode_required_event_};
+ request_wait_time_expired_event_};
// Connect to GPS.
gps_handle_ = GPSOpenDevice(position_update_event,
@@ -235,7 +237,13 @@
if (state_ == STATE_FIX_ACQUIRED) {
assert(position_.IsGoodFix());
if (request_address_ && !position_.IncludesAddress()) {
- MakeReverseGeocodeRequest(position_);
+ request_wait_time_timed_callback_mutex_.Lock();
+ if (request_wait_time_timed_callback_.get()) {
+ is_new_reverse_geocode_required_ = true;
+ } else {
+ MakeReverseGeocodeRequest(position_);
+ }
+ request_wait_time_timed_callback_mutex_.Unlock();
} else {
UpdateListeners();
}
@@ -247,8 +255,14 @@
case WAIT_OBJECT_0 + 3: // state_change_event
HandleStateChange();
break;
- case WAIT_OBJECT_0 + 4: // new_reverse_geocode_required_event_
- MakeReverseGeocodeRequest(position_);
+ case WAIT_OBJECT_0 + 4: // request_wait_time_expired_event_
+ request_wait_time_timed_callback_mutex_.Lock();
+ assert(request_wait_time_timed_callback_.get());
+ request_wait_time_timed_callback_.reset();
+ if (is_new_reverse_geocode_required_) {
+ MakeReverseGeocodeRequest(position_);
+ }
+ request_wait_time_timed_callback_mutex_.Unlock();
break;
default:
// Wait timed out.
@@ -343,7 +357,11 @@
request_address_) {
// The positions differ significantly and an address was requested.
position_ = new_position;
- if (is_reverse_geocode_in_progress_) {
+ MutexLock lock(&request_wait_time_timed_callback_mutex_);
+ if (is_reverse_geocode_in_progress_ ||
+ request_wait_time_timed_callback_.get()) {
+ // A reverse geocode is in progress or we're waiting for the time between
+ // requests to expire.
is_new_reverse_geocode_required_ = true;
} else {
MakeReverseGeocodeRequest(position_);
@@ -377,8 +395,8 @@
}
// ReverseGeocoder::ListenerInterface implementation
-void WinceGpsLocationProvider::ReverseGeocodeAvailable(
- const Position &position) {
+void WinceGpsLocationProvider::ReverseGeocodeAvailable(const Position
&position,
+ bool server_error) {
assert(is_reverse_geocode_in_progress_);
MutexLock lock(&position_mutex_);
@@ -388,27 +406,51 @@
is_reverse_geocode_in_progress_ = false;
UpdateListeners();
- if (is_new_reverse_geocode_required_) {
- new_reverse_geocode_required_event_.Set();
- }
+ // Get earliest time for next request.
+ int64 timeout =
+ BackoffManager::ReportResponse(reverse_geocode_url_, server_error) -
+ GetCurrentTimeMillis();
+ MutexLock callback_lock(&request_wait_time_timed_callback_mutex_);
+ assert(request_wait_time_timed_callback_ == NULL);
+ request_wait_time_timed_callback_.reset(new TimedCallback(
+ this,
+ timeout > 0 ? static_cast<int>(timeout) : 0,
+ NULL));
}
void WinceGpsLocationProvider::MakeReverseGeocodeRequest(
const Position &position) {
+ // request_wait_time_timed_callback_mutex_ should alwways be locked when this
+ // method is called.
assert(request_address_);
assert(reverse_geocoder_.get());
+ assert(request_wait_time_timed_callback_.get() == NULL);
if (is_reverse_geocode_in_progress_) {
return;
}
is_reverse_geocode_in_progress_ = true;
is_new_reverse_geocode_required_ = false;
+
+ BackoffManager::ReportRequest(reverse_geocode_url_);
// Note that this will fail if a request is already in progress.
if (!reverse_geocoder_->MakeRequest(position)) {
LOG("Failed to make reverse geocode request.");
is_reverse_geocode_in_progress_ = false;
}
+}
+
+// TimedCallback::ListenerInterface implementation
+void WinceGpsLocationProvider::OnTimeout(TimedCallback *caller,
+ void *user_data) {
+ MutexLock lock(&request_wait_time_timed_callback_mutex_);
+
+ assert(user_data == NULL);
+ assert(request_wait_time_timed_callback_.get());
+ assert(request_wait_time_timed_callback_ == caller);
+
+ request_wait_time_expired_event_.Set();
}
// Local functions
====
//depot/googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.h#5
-
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.h
====
# action=edit type=text
---
googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.h
2008-10-07 19:10:40.000000000 +0100
+++
googleclient/gears/opensource/gears/geolocation/gps_location_provider_wince.h
2008-10-07 18:50:47.000000000 +0100
@@ -33,12 +33,14 @@
#include "gears/base/common/thread.h"
#include "gears/geolocation/location_provider.h"
#include "gears/geolocation/geolocation.h"
+#include "gears/geolocation/timed_callback.h"
#include "gears/geolocation/reverse_geocoder.h"
class WinceGpsLocationProvider
: public LocationProviderBase,
public Thread,
- public ReverseGeocoder::ReverseGeocoderListenerInterface {
+ public ReverseGeocoder::ReverseGeocoderListenerInterface,
+ public TimedCallback::ListenerInterface {
public:
WinceGpsLocationProvider(const std::string16 &reverse_geocode_url,
const std::string16 &host_name,
@@ -60,7 +62,11 @@
virtual void Run();
// ReverseGeocoder::ListenerInterface implementation
- virtual void ReverseGeocodeAvailable(const Position &position);
+ virtual void ReverseGeocodeAvailable(const Position &position,
+ bool server_error);
+
+ // TimedCallback::ListenerInterface implementation
+ virtual void OnTimeout(TimedCallback *caller, void *user_data);
// Callbacks used to handle updates from the GPS Intermediate Driver library.
void HandlePositionUpdate();
@@ -78,7 +84,7 @@
// Events signalled to the thread that waits for events from the GPS API.
CEvent stop_event_;
CEvent new_listener_waiting_event_;
- CEvent new_reverse_geocode_required_event_;
+ CEvent request_wait_time_expired_event_;
// The state of the attempt to get a fix from the GPS. Use for determining
// timeouts.
@@ -99,6 +105,11 @@
bool is_reverse_geocode_in_progress_;
bool is_new_reverse_geocode_required_;
+ // A timed callback used to trigger an event when the required wait time
+ // between subsequent requests to the reverse geocoder server has elapsed.
+ scoped_ptr<TimedCallback> request_wait_time_timed_callback_;
+ Mutex request_wait_time_timed_callback_mutex_;
+
DISALLOW_EVIL_CONSTRUCTORS(WinceGpsLocationProvider);
};
====
//depot/googleclient/gears/opensource/gears/geolocation/network_location_provider.cc#26
-
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/network_location_provider.cc
====
# action=edit type=text
---
googleclient/gears/opensource/gears/geolocation/network_location_provider.cc
2008-10-07 19:10:40.000000000 +0100
+++
googleclient/gears/opensource/gears/geolocation/network_location_provider.cc
2008-10-07 17:50:23.000000000 +0100
@@ -27,73 +27,11 @@
#include "gears/base/common/stopwatch.h" // For GetCurrentTimeMillis
#include "gears/geolocation/access_token_manager.h"
+#include "gears/geolocation/backoff_manager.h"
// The maximum period of time we'll wait for a complete set of device data
// before sending the request.
static const int kDataCompleteWaitPeriod = 1000 * 2; // 2 seconds
-// The baseline minimum period between network requests.
-static const int kBaselineMinimumRequestInterval = 1000 * 5; // 5 seconds
-// The upper limit of the minimum period between network requests.
-static const int kMinimumRequestIntervalLimit = 1000 * 60 * 60 * 3; // 3 hours
-
-
-// The BackoffManager class is used to implement exponential back-off for
-// network requests in case of sever errors. Users report to the BackoffManager
-// class when they make a request to or receive a response from a given url.
The
-// BackoffManager class provides the earliest time at which subsequent requests
-// should be made.
-class BackoffManager {
- public:
- static void ReportRequest(const std::string16 &url) {
- MutexLock lock(&servers_mutex_);
- ServerMap::iterator iter = servers_.find(url);
- if (iter != servers_.end()) {
- iter->second.first = GetCurrentTimeMillis();
- } else {
- servers_[url] = std::make_pair(GetCurrentTimeMillis(),
- kBaselineMinimumRequestInterval);
- }
- }
-
- static int64 ReportResponse(const std::string16 &url, bool server_error) {
- // Use exponential back-off on server error.
- MutexLock lock(&servers_mutex_);
- ServerMap::iterator iter = servers_.find(url);
- assert(iter != servers_.end());
- int64 *interval = &iter->second.second;
- if (server_error) {
- if (*interval < kMinimumRequestIntervalLimit) {
- // Increase interval by between 90% and 110%.
- srand(static_cast<unsigned int>(GetCurrentTimeMillis()));
- double increment_proportion = 0.9 + 0.2 * rand() / RAND_MAX;
- int64 increment = static_cast<int64>(*interval * increment_proportion);
- if (increment > kMinimumRequestIntervalLimit - *interval) {
- *interval = kMinimumRequestIntervalLimit;
- } else {
- *interval += increment;
- }
- }
- } else {
- *interval = kBaselineMinimumRequestInterval;
- }
- return iter->second.first + *interval;
- }
-
- private:
- // A map from server URL to a pair of integers representing the last request
- // time and the current minimum interval between requests, both in
- // milliseconds.
- typedef std::map<std::string16, std::pair<int64, int64> > ServerMap;
- static ServerMap servers_;
-
- // The mutex used to protect the map.
- static Mutex servers_mutex_;
-
- DISALLOW_EVIL_CONSTRUCTORS(BackoffManager);
-};
-
-BackoffManager::ServerMap BackoffManager::servers_;
-Mutex BackoffManager::servers_mutex_;
LocationProviderBase *NewNetworkLocationProvider(
====
//depot/googleclient/gears/opensource/gears/geolocation/reverse_geocoder.cc#2 -
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/reverse_geocoder.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/geolocation/reverse_geocoder.cc
2008-10-07 19:10:40.000000000 +0100
+++ googleclient/gears/opensource/gears/geolocation/reverse_geocoder.cc
2008-10-07 16:57:28.000000000 +0100
@@ -77,15 +77,12 @@
// NetworkLocationRequest::ListenerInterface implementation.
void ReverseGeocoder::LocationResponseAvailable(
const Position &position,
- bool /* server_error */,
+ bool server_error,
const std::string16 &access_token) {
- // TODO(steveblock): Correctly handle exponential back-off in case of server
- // error.
-
// Record access_token if it's set.
if (!access_token.empty()) {
AccessTokenManager::GetInstance()->SetToken(url_, access_token);
}
- listener_->ReverseGeocodeAvailable(position);
+ listener_->ReverseGeocodeAvailable(position, server_error);
}
====
//depot/googleclient/gears/opensource/gears/geolocation/reverse_geocoder.h#1 -
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/reverse_geocoder.h
====
# action=edit type=text
--- googleclient/gears/opensource/gears/geolocation/reverse_geocoder.h
2008-10-07 19:10:40.000000000 +0100
+++ googleclient/gears/opensource/gears/geolocation/reverse_geocoder.h
2008-10-07 16:57:48.000000000 +0100
@@ -34,7 +34,8 @@
// NetworkLocationRequest::ListenerInterface.
class ReverseGeocoderListenerInterface {
public:
- virtual void ReverseGeocodeAvailable(const Position &position) = 0;
+ virtual void ReverseGeocodeAvailable(const Position &position,
+ bool server_error) = 0;
virtual ~ReverseGeocoderListenerInterface() {}
};
====
//depot/googleclient/gears/opensource/gears/geolocation/timed_callback.cc#4 -
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/geolocation/timed_callback.cc
====
# action=edit type=text
--- googleclient/gears/opensource/gears/geolocation/timed_callback.cc
2008-10-07 19:10:40.000000000 +0100
+++ googleclient/gears/opensource/gears/geolocation/timed_callback.cc
2008-10-07 17:22:21.000000000 +0100
@@ -32,7 +32,7 @@
timeout_(timeout_milliseconds),
user_data_(user_data) {
assert(listener_);
- assert(timeout_ > 0);
+ assert(timeout_ >= 0);
Start();
}