Enable component updater: update to protocol version 4.0
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
)]}' {
|
||||
"response": {
|
||||
"server": "prod",
|
||||
"protocol": "4.0",
|
||||
"apps": [
|
||||
{
|
||||
"appid": "gcmjkmgdlgnkkcocmoeiminaijmmjnii",
|
||||
"status": "ok",
|
||||
"updatecheck": {
|
||||
"status": "ok",
|
||||
"nextversion": "1.0.0",
|
||||
"pipelines": [
|
||||
{
|
||||
"operations": [
|
||||
{
|
||||
"type": "download",
|
||||
"urls": [ { "url": "https://www.cromite.org/components/fonts_component.zip" } ],
|
||||
"out": { "sha256": "22639FA1B21D9D95E6343A6A58028B224903D23BA404537584A22236FCFC3482" },
|
||||
"size": 60716451
|
||||
},
|
||||
{
|
||||
"type": "crx3",
|
||||
"in": { "sha256": "22639FA1B21D9D95E6343A6A58028B224903D23BA404537584A22236FCFC3482" }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -24,12 +24,13 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
components/update_client/component.cc | 12 +++++
|
||||
components/update_client/crx_downloader.cc | 5 ++
|
||||
components/update_client/net/network_impl.cc | 2 +
|
||||
components/update_client/protocol_parser.cc | 2 +
|
||||
.../update_client/protocol_parser_json.cc | 2 +
|
||||
components/update_client/request_sender.cc | 3 +-
|
||||
components/update_client/update_checker.cc | 6 ++-
|
||||
components/update_client/update_engine.cc | 9 ++++
|
||||
components/update_client/utils.cc | 3 ++
|
||||
21 files changed, 132 insertions(+), 49 deletions(-)
|
||||
22 files changed, 134 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/android_webview/browser/aw_browser_main_parts.cc b/android_webview/browser/aw_browser_main_parts.cc
|
||||
--- a/android_webview/browser/aw_browser_main_parts.cc
|
||||
@@ -389,7 +390,7 @@ diff --git a/components/component_updater/component_updater_url_constants.cc b/c
|
||||
// --component-updater=url-source=someurl.
|
||||
const char kUpdaterJSONDefaultUrl[] =
|
||||
- "https://update.googleapis.com/service/update2/json";
|
||||
+ "https://www.cromite.org/components/query.json";
|
||||
+ "https://www.cromite.org/components/query4_0.json";
|
||||
|
||||
const char kUpdaterJSONFallbackUrl[] =
|
||||
- "http://update.googleapis.com/service/update2/json";
|
||||
@@ -584,6 +585,25 @@ diff --git a/components/update_client/net/network_impl.cc b/components/update_cl
|
||||
simple_url_loader->SetOnResponseStartedCallback(base::BindOnce(
|
||||
&NetworkFetcherImpl::OnResponseStartedCallback, base::Unretained(this),
|
||||
std::move(response_started_callback)));
|
||||
diff --git a/components/update_client/protocol_parser.cc b/components/update_client/protocol_parser.cc
|
||||
--- a/components/update_client/protocol_parser.cc
|
||||
+++ b/components/update_client/protocol_parser.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/strings/stringprintf.h"
|
||||
+#include "base/logging.h"
|
||||
|
||||
namespace update_client {
|
||||
|
||||
@@ -54,6 +55,7 @@ void ProtocolParser::ParseError(const char* details, ...) {
|
||||
|
||||
base::StringAppendV(&errors_, details, args);
|
||||
va_end(args);
|
||||
+ LOG(INFO) << "ParseError " << errors_;
|
||||
}
|
||||
|
||||
bool ProtocolParser::Parse(const std::string& response) {
|
||||
diff --git a/components/update_client/protocol_parser_json.cc b/components/update_client/protocol_parser_json.cc
|
||||
--- a/components/update_client/protocol_parser_json.cc
|
||||
+++ b/components/update_client/protocol_parser_json.cc
|
||||
|
||||
Reference in New Issue
Block a user