OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/autofill/core/browser/autofill_download_manager.h" | 5 #include "components/autofill/core/browser/autofill_download_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 if (!upload.SerializeToString(&payload)) | 208 if (!upload.SerializeToString(&payload)) |
209 return false; | 209 return false; |
210 | 210 |
211 if (form.upload_required() == UPLOAD_NOT_REQUIRED) { | 211 if (form.upload_required() == UPLOAD_NOT_REQUIRED) { |
212 VLOG(1) << "AutofillDownloadManager: Upload request is ignored."; | 212 VLOG(1) << "AutofillDownloadManager: Upload request is ignored."; |
213 // If we ever need notification that upload was skipped, add it here. | 213 // If we ever need notification that upload was skipped, add it here. |
214 return false; | 214 return false; |
215 } | 215 } |
216 | 216 |
217 FormRequestData request_data; | 217 FormRequestData request_data; |
218 request_data.form_signatures.push_back(form.FormSignature()); | 218 request_data.form_signatures.push_back(form.FormSignatureAsStr()); |
219 request_data.request_type = AutofillDownloadManager::REQUEST_UPLOAD; | 219 request_data.request_type = AutofillDownloadManager::REQUEST_UPLOAD; |
220 request_data.payload = payload; | 220 request_data.payload = payload; |
221 | 221 |
222 VLOG(1) << "Sending Autofill Upload Request:\n" << upload; | 222 VLOG(1) << "Sending Autofill Upload Request:\n" << upload; |
223 | 223 |
224 return StartRequest(request_data); | 224 return StartRequest(request_data); |
225 } | 225 } |
226 | 226 |
227 bool AutofillDownloadManager::StartRequest( | 227 bool AutofillDownloadManager::StartRequest( |
228 const FormRequestData& request_data) { | 228 const FormRequestData& request_data) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 it->second.second.form_signatures); | 346 it->second.second.form_signatures); |
347 } else { | 347 } else { |
348 VLOG(1) << "AutofillDownloadManager: upload request has succeeded."; | 348 VLOG(1) << "AutofillDownloadManager: upload request has succeeded."; |
349 observer_->OnUploadedPossibleFieldTypes(); | 349 observer_->OnUploadedPossibleFieldTypes(); |
350 } | 350 } |
351 } | 351 } |
352 url_fetchers_.erase(it); | 352 url_fetchers_.erase(it); |
353 } | 353 } |
354 | 354 |
355 } // namespace autofill | 355 } // namespace autofill |
OLD | NEW |