Index: extensions/browser/updater/update_service_browsertest.cc |
diff --git a/extensions/browser/updater/update_service_browsertest.cc b/extensions/browser/updater/update_service_browsertest.cc |
index 78fe377cd5c2f6c3f88684bb2e66d584611bfe9b..c4ff0ef0cb56fe50262a9f5dc74628a54fb4a366 100644 |
--- a/extensions/browser/updater/update_service_browsertest.cc |
+++ b/extensions/browser/updater/update_service_browsertest.cc |
@@ -27,8 +27,9 @@ namespace { |
using FakeResponse = std::pair<std::string, net::HttpStatusCode>; |
// TODO(rockot): In general there's enough mock-Omaha-noise that this might be |
-// better placed into some test library code in //components/omaha_client. |
-FakeResponse CreateFakeOmahaResponse(const std::string& id, size_t crx_length) { |
+// better placed into some test library code in //components/update_client. |
+FakeResponse CreateFakeUpdateResponse(const std::string& id, |
+ size_t crx_length) { |
std::string response_text = base::StringPrintf( |
"<gupdate xmlns=\"http://www.google.com/update2/response\" " |
" protocol=\"2.0\" server=\"prod\">\n" |
@@ -45,7 +46,7 @@ FakeResponse CreateFakeOmahaResponse(const std::string& id, size_t crx_length) { |
return std::make_pair(response_text, net::HTTP_OK); |
} |
-FakeResponse CreateFakeOmahaNotFoundResponse() { |
+FakeResponse CreateFakeUpdateNotFoundResponse() { |
return std::make_pair( |
std::string( |
"<gupdate xmlns=\"http://www.google.com/update2/response\" " |
@@ -76,7 +77,7 @@ bool ExtractKeyValueFromComponent(const std::string& component_str, |
// This function extracts the 'x' query parameter (e.g. "id%3Dabcdef...."), |
// unescapes its value (to become e.g., "id=abcdef...", and then extracts the |
// 'id' value from the result (e.g. "abcdef..."). |
-bool ExtractIdFromOmahaQuery(const std::string& query_str, std::string* id) { |
+bool ExtractIdFromUpdateQuery(const std::string& query_str, std::string* id) { |
std::string data_string; |
if (!ExtractKeyValueFromComponent(query_str, "x", &data_string)) |
return false; |
@@ -99,7 +100,7 @@ class FakeUpdateURLFetcherFactory : public net::URLFetcherFactory { |
void RegisterFakeExtension(const std::string& id, |
const std::string& contents) { |
- CHECK(id.size() == 32); |
+ CHECK_EQ(32u, id.size()); |
fake_extensions_.insert(std::make_pair(id, contents)); |
} |
@@ -128,14 +129,14 @@ class FakeUpdateURLFetcherFactory : public net::URLFetcherFactory { |
// Otherwise return an invalid-ID response. |
FakeResponse response; |
std::string extension_id; |
- if (!ExtractIdFromOmahaQuery(url.query(), &extension_id)) { |
- response = CreateFakeOmahaNotFoundResponse(); |
+ if (!ExtractIdFromUpdateQuery(url.query(), &extension_id)) { |
+ response = CreateFakeUpdateNotFoundResponse(); |
} else { |
const auto& iter = fake_extensions_.find(extension_id); |
if (iter == fake_extensions_.end()) |
- response = CreateFakeOmahaNotFoundResponse(); |
+ response = CreateFakeUpdateNotFoundResponse(); |
else |
- response = CreateFakeOmahaResponse(extension_id, iter->second.size()); |
+ response = CreateFakeUpdateResponse(extension_id, iter->second.size()); |
} |
return new net::FakeURLFetcher(url, delegate, response.first, |
response.second, |