| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_AUTOFILL_AUTOFILL_DOWNLOAD_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_DOWNLOAD_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_DOWNLOAD_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_DOWNLOAD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // |request_data| - form signature hash(es) and indicator if it was a query. | 102 // |request_data| - form signature hash(es) and indicator if it was a query. |
| 103 // |request_data.query| - if true the data is queried and observer notified | 103 // |request_data.query| - if true the data is queried and observer notified |
| 104 // with new data, if available. If false heuristic data is uploaded to our | 104 // with new data, if available. If false heuristic data is uploaded to our |
| 105 // servers. | 105 // servers. |
| 106 bool StartRequest(const std::string& form_xml, | 106 bool StartRequest(const std::string& form_xml, |
| 107 const FormRequestData& request_data); | 107 const FormRequestData& request_data); |
| 108 | 108 |
| 109 // URLFetcher::Delegate implementation: | 109 // URLFetcher::Delegate implementation: |
| 110 virtual void OnURLFetchComplete(const URLFetcher* source, | 110 virtual void OnURLFetchComplete(const URLFetcher* source, |
| 111 const GURL& url, | 111 const GURL& url, |
| 112 const URLRequestStatus& status, | 112 const net::URLRequestStatus& status, |
| 113 int response_code, | 113 int response_code, |
| 114 const ResponseCookies& cookies, | 114 const ResponseCookies& cookies, |
| 115 const std::string& data); | 115 const std::string& data); |
| 116 | 116 |
| 117 // Profile for preference storage. | 117 // Profile for preference storage. |
| 118 Profile* profile_; | 118 Profile* profile_; |
| 119 | 119 |
| 120 // For each requested form for both query and upload we create a separate | 120 // For each requested form for both query and upload we create a separate |
| 121 // request and save its info. As url fetcher is identified by its address | 121 // request and save its info. As url fetcher is identified by its address |
| 122 // we use a map between fetchers and info. | 122 // we use a map between fetchers and info. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 134 double positive_upload_rate_; | 134 double positive_upload_rate_; |
| 135 double negative_upload_rate_; | 135 double negative_upload_rate_; |
| 136 | 136 |
| 137 // Needed for unit-test. | 137 // Needed for unit-test. |
| 138 int fetcher_id_for_unittest_; | 138 int fetcher_id_for_unittest_; |
| 139 bool is_testing_; | 139 bool is_testing_; |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_DOWNLOAD_H_ | 142 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_DOWNLOAD_H_ |
| 143 | 143 |
| OLD | NEW |