| Index: dbus_service.cc
|
| diff --git a/dbus_service.cc b/dbus_service.cc
|
| index 5a1a1056e3dbd57fb828c9aade3616a7d2320e03..a9727f82070b17edd88bf44acf452cf9616c0fe4 100644
|
| --- a/dbus_service.cc
|
| +++ b/dbus_service.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
| +// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -14,6 +14,10 @@
|
|
|
| using std::string;
|
|
|
| +static const char kAUTestURLRequest[] = "autest";
|
| +static const char kAUTestURL[] =
|
| + "https://omaha.corp.google.com:8082/service/update2";
|
| +
|
| G_DEFINE_TYPE(UpdateEngineService, update_engine_service, G_TYPE_OBJECT)
|
|
|
| static void update_engine_service_finalize(GObject* object) {
|
| @@ -59,7 +63,8 @@ gboolean update_engine_service_attempt_update(UpdateEngineService* self,
|
| string update_app_version;
|
| string update_omaha_url;
|
| // Only non-official (e.g., dev and test) builds can override the current
|
| - // version and update server URL over D-Bus.
|
| + // version and update server URL over D-Bus. However, pointing to the
|
| + // hardcoded test update server URL is always allowed.
|
| if (!chromeos_update_engine::utils::IsOfficialBuild()) {
|
| if (app_version) {
|
| update_app_version = app_version;
|
| @@ -68,6 +73,9 @@ gboolean update_engine_service_attempt_update(UpdateEngineService* self,
|
| update_omaha_url = omaha_url;
|
| }
|
| }
|
| + if (omaha_url && strcmp(omaha_url, kAUTestURLRequest) == 0) {
|
| + update_omaha_url = kAUTestURL;
|
| + }
|
| LOG(INFO) << "Attempt update: app_version=\"" << update_app_version << "\" "
|
| << "omaha_url=\"" << update_omaha_url << "\"";
|
| self->update_attempter_->CheckForUpdate(update_app_version, update_omaha_url);
|
|
|