| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 // Starts an upload request for the given |form|, unless throttled by the | 76 // Starts an upload request for the given |form|, unless throttled by the |
| 77 // server. The probability of the request going over the wire is | 77 // server. The probability of the request going over the wire is |
| 78 // GetPositiveUploadRate() if |form_was_autofilled| is true, or | 78 // GetPositiveUploadRate() if |form_was_autofilled| is true, or |
| 79 // GetNegativeUploadRate() otherwise. The observer will be called even if | 79 // GetNegativeUploadRate() otherwise. The observer will be called even if |
| 80 // there was no actual trip over the wire. | 80 // there was no actual trip over the wire. |
| 81 // |available_field_types| should contain the types for which we have data | 81 // |available_field_types| should contain the types for which we have data |
| 82 // stored on the local client. | 82 // stored on the local client. |
| 83 bool StartUploadRequest(const FormStructure& form, | 83 bool StartUploadRequest(const FormStructure& form, |
| 84 bool form_was_autofilled, | 84 bool form_was_autofilled, |
| 85 const FieldTypeSet& available_field_types); | 85 const ServerFieldTypeSet& available_field_types); |
| 86 | 86 |
| 87 private: | 87 private: |
| 88 friend class AutofillDownloadTest; | 88 friend class AutofillDownloadTest; |
| 89 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadTest, QueryAndUploadTest); | 89 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadTest, QueryAndUploadTest); |
| 90 | 90 |
| 91 static std::string AutofillRequestTypeToString(const AutofillRequestType); | 91 static std::string AutofillRequestTypeToString(const AutofillRequestType); |
| 92 | 92 |
| 93 struct FormRequestData; | 93 struct FormRequestData; |
| 94 typedef std::list<std::pair<std::string, std::string> > QueryRequestCache; | 94 typedef std::list<std::pair<std::string, std::string> > QueryRequestCache; |
| 95 | 95 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 double positive_upload_rate_; | 161 double positive_upload_rate_; |
| 162 double negative_upload_rate_; | 162 double negative_upload_rate_; |
| 163 | 163 |
| 164 // Needed for unit-test. | 164 // Needed for unit-test. |
| 165 int fetcher_id_for_unittest_; | 165 int fetcher_id_for_unittest_; |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace autofill | 168 } // namespace autofill |
| 169 | 169 |
| 170 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_H_ | 170 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_H_ |
| OLD | NEW |