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

Unified Diff: components/autofill/core/browser/autofill_download_manager.cc

Issue 1477733003: Replace xmllite with libxml in autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@556433_remove_dead_code
Patch Set: Just rebased Created 5 years, 1 month 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: components/autofill/core/browser/autofill_download_manager.cc
diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/components/autofill/core/browser/autofill_download_manager.cc
index 17ffec100d3063be83005ce038720c397ed7d036..38c8484669d89c9112fcaa12b0126e92816866a8 100644
--- a/components/autofill/core/browser/autofill_download_manager.cc
+++ b/components/autofill/core/browser/autofill_download_manager.cc
@@ -4,6 +4,8 @@
#include "components/autofill/core/browser/autofill_download_manager.h"
+#include <utility>
+
#include "base/logging.h"
#include "base/prefs/pref_service.h"
#include "base/rand_util.h"
@@ -21,7 +23,6 @@
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_fetcher.h"
-#include "third_party/webrtc/libjingle/xmllite/xmlparser.h"
#include "url/gurl.h"
namespace autofill {
@@ -119,7 +120,7 @@ bool AutofillDownloadManager::StartQueryRequest(
VLOG(1) << "AutofillDownloadManager: query request has been retrieved "
<< "from the cache, form signatures: "
<< GetCombinedSignature(request_data.form_signatures);
- observer_->OnLoadedServerPredictions(query_data,
+ observer_->OnLoadedServerPredictions(std::move(query_data),
request_data.form_signatures);
return true;
}
@@ -342,16 +343,14 @@ void AutofillDownloadManager::OnURLFetchComplete(
<< " request has succeeded with response body: " << response_body;
if (it->second.request_type == AutofillDownloadManager::REQUEST_QUERY) {
CacheQueryRequest(it->second.form_signatures, response_body);
- observer_->OnLoadedServerPredictions(response_body,
+ observer_->OnLoadedServerPredictions(std::move(response_body),
it->second.form_signatures);
} else {
double new_positive_upload_rate = 0;
double new_negative_upload_rate = 0;
- AutofillUploadXmlParser parse_handler(&new_positive_upload_rate,
- &new_negative_upload_rate);
- buzz::XmlParser parser(&parse_handler);
- parser.Parse(response_body.data(), response_body.length(), true);
- if (parse_handler.succeeded()) {
+ if (ParseAutofillUploadXml(std::move(response_body),
+ &new_positive_upload_rate,
+ &new_negative_upload_rate)) {
SetPositiveUploadRate(new_positive_upload_rate);
SetNegativeUploadRate(new_negative_upload_rate);
}

Powered by Google App Engine
This is Rietveld 408576698