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

Unified Diff: chrome/browser/component_updater/test/test_configurator.cc

Issue 375973003: Componentize component_updater: Use Configurator to build query parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix one gyp omission Created 6 years, 5 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
Index: chrome/browser/component_updater/test/test_configurator.cc
diff --git a/chrome/browser/component_updater/test/test_configurator.cc b/chrome/browser/component_updater/test/test_configurator.cc
index 8cf49d26f183fe41d9ff02763f088c3f92af784a..bbd186c758a335c509ddb6013331a1afe80ff8bc 100644
--- a/chrome/browser/component_updater/test/test_configurator.cc
+++ b/chrome/browser/component_updater/test/test_configurator.cc
@@ -5,6 +5,7 @@
#include <string>
#include "base/run_loop.h"
+#include "base/strings/stringprintf.h"
#include "chrome/browser/component_updater/test/test_configurator.h"
#include "content/public/browser/browser_thread.h"
#include "url/gurl.h"
@@ -66,10 +67,36 @@ GURL TestConfigurator::PingUrl() const {
return UpdateUrl();
}
+base::Version TestConfigurator::ApplicationVersion() const {
+ return base::Version("1.0");
+}
+
+std::string TestConfigurator::PlatformRequestParams() const {
+ return base::StringPrintf(
+ "version=\"%s-%s\" prodversion=\"%s\" "
+ "lang=\"%s\" updaterchannel=\"%s\" prodchannel=\"%s\" "
+ "os=\"%s\" arch=\"%s\" nacl_arch=\"%s\"",
+ "prodid",
+ "1.0", // "version"
+ "prodversion", // "prodversion"
+ "fakelanguage", // "lang",
+ "fakechannel", // "updaterchannel"
+ "fakechannel", // "prodchannel"
+ "fakeos", // "os"
+ "fakearch", // "arch"
+ "fakenacl_arch"); // "nacl_arch"
+}
+
std::string TestConfigurator::ExtraRequestParams() const {
return "extra=\"foo\"";
}
+std::string TestConfigurator::RequestOSTag() const {
+ return base::StringPrintf(
+ "<os platform=\"%s\" version=\"%s\" arch=\"%s\"/>",
+ "fake_platform", "fake_version", "fake_arch");
+}
+
size_t TestConfigurator::UrlSizeLimit() const {
return 256;
}

Powered by Google App Engine
This is Rietveld 408576698