| 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_MANAGER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_MANAGER_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_MANAGER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 const std::string& query_data); | 111 const std::string& query_data); |
| 112 // Returns true if query is in the cache, while filling |query_data|, false | 112 // Returns true if query is in the cache, while filling |query_data|, false |
| 113 // otherwise. |forms_in_query| is a vector of form signatures in the query. | 113 // otherwise. |forms_in_query| is a vector of form signatures in the query. |
| 114 bool CheckCacheForQueryRequest(const std::vector<std::string>& forms_in_query, | 114 bool CheckCacheForQueryRequest(const std::vector<std::string>& forms_in_query, |
| 115 std::string* query_data) const; | 115 std::string* query_data) const; |
| 116 // Concatenates |forms_in_query| into one signature. | 116 // Concatenates |forms_in_query| into one signature. |
| 117 std::string GetCombinedSignature( | 117 std::string GetCombinedSignature( |
| 118 const std::vector<std::string>& forms_in_query) const; | 118 const std::vector<std::string>& forms_in_query) const; |
| 119 | 119 |
| 120 // net::URLFetcherDelegate implementation: | 120 // net::URLFetcherDelegate implementation: |
| 121 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 121 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 122 | 122 |
| 123 // Probability of the form upload. Between 0 (no upload) and 1 (upload all). | 123 // Probability of the form upload. Between 0 (no upload) and 1 (upload all). |
| 124 // GetPositiveUploadRate() is for matched forms, | 124 // GetPositiveUploadRate() is for matched forms, |
| 125 // GetNegativeUploadRate() for non-matched. | 125 // GetNegativeUploadRate() for non-matched. |
| 126 double GetPositiveUploadRate() const; | 126 double GetPositiveUploadRate() const; |
| 127 double GetNegativeUploadRate() const; | 127 double GetNegativeUploadRate() const; |
| 128 void SetPositiveUploadRate(double rate); | 128 void SetPositiveUploadRate(double rate); |
| 129 void SetNegativeUploadRate(double rate); | 129 void SetNegativeUploadRate(double rate); |
| 130 | 130 |
| 131 // The AutofillDriver that this instance will use. Must not be null, and must | 131 // The AutofillDriver that this instance will use. Must not be null, and must |
| (...skipping 28 matching lines...) Expand all Loading... |
| 160 double positive_upload_rate_; | 160 double positive_upload_rate_; |
| 161 double negative_upload_rate_; | 161 double negative_upload_rate_; |
| 162 | 162 |
| 163 // Needed for unit-test. | 163 // Needed for unit-test. |
| 164 int fetcher_id_for_unittest_; | 164 int fetcher_id_for_unittest_; |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 } // namespace autofill | 167 } // namespace autofill |
| 168 | 168 |
| 169 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_MANAGER_H_ | 169 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |