| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool form_was_autofilled, | 87 bool form_was_autofilled, |
| 88 const ServerFieldTypeSet& available_field_types, | 88 const ServerFieldTypeSet& available_field_types, |
| 89 const std::string& login_form_signature, | 89 const std::string& login_form_signature, |
| 90 bool observed_submission); | 90 bool observed_submission); |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 friend class AutofillDownloadManagerTest; | 93 friend class AutofillDownloadManagerTest; |
| 94 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadManagerTest, QueryAndUploadTest); | 94 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadManagerTest, QueryAndUploadTest); |
| 95 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadManagerTest, BackoffLogic_Upload); | 95 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadManagerTest, BackoffLogic_Upload); |
| 96 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadManagerTest, BackoffLogic_Query); | 96 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadManagerTest, BackoffLogic_Query); |
| 97 FRIEND_TEST_ALL_PREFIXES(AutofillDownloadManagerTest, UploadRequestIsGzipped); | |
| 98 | 97 |
| 99 struct FormRequestData; | 98 struct FormRequestData; |
| 100 typedef std::list<std::pair<std::string, std::string> > QueryRequestCache; | 99 typedef std::list<std::pair<std::string, std::string> > QueryRequestCache; |
| 101 | 100 |
| 102 // Initiates request to Autofill servers to download/upload type predictions. | 101 // Initiates request to Autofill servers to download/upload type predictions. |
| 103 // |request_data| - form signature hash(es), request payload data and request | 102 // |request_data| - form signature hash(es), request payload data and request |
| 104 // type (query or upload). | 103 // type (query or upload). |
| 105 bool StartRequest(const FormRequestData& request_data); | 104 bool StartRequest(const FormRequestData& request_data); |
| 106 | 105 |
| 107 // Each request is page visited. We store last |max_form_cache_size| | 106 // Each request is page visited. We store last |max_form_cache_size| |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 147 |
| 149 // Needed for unit-test. | 148 // Needed for unit-test. |
| 150 int fetcher_id_for_unittest_; | 149 int fetcher_id_for_unittest_; |
| 151 | 150 |
| 152 base::WeakPtrFactory<AutofillDownloadManager> weak_factory_; | 151 base::WeakPtrFactory<AutofillDownloadManager> weak_factory_; |
| 153 }; | 152 }; |
| 154 | 153 |
| 155 } // namespace autofill | 154 } // namespace autofill |
| 156 | 155 |
| 157 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_MANAGER_H_ | 156 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |