Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3061)

Unified Diff: dbus_service.cc

Issue 6901068: If the Omaha URL is 'autest', point to the hardcoded test server. (Closed) Base URL: ssh://gitrw.chromium.org:9222/update_engine.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698