OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/autofill/autofill_download.h" | 5 #include "chrome/browser/autofill/autofill_download.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <ostream> | 8 #include <ostream> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 232 |
233 for (size_t i = 0; i < forms_in_query.size(); ++i) { | 233 for (size_t i = 0; i < forms_in_query.size(); ++i) { |
234 if (i) | 234 if (i) |
235 signature.append(","); | 235 signature.append(","); |
236 signature.append(forms_in_query[i]); | 236 signature.append(forms_in_query[i]); |
237 } | 237 } |
238 return signature; | 238 return signature; |
239 } | 239 } |
240 | 240 |
241 void AutofillDownloadManager::OnURLFetchComplete( | 241 void AutofillDownloadManager::OnURLFetchComplete( |
242 const content::URLFetcher* source) { | 242 const net::URLFetcher* source) { |
243 std::map<content::URLFetcher *, FormRequestData>::iterator it = | 243 std::map<net::URLFetcher *, FormRequestData>::iterator it = |
244 url_fetchers_.find(const_cast<content::URLFetcher*>(source)); | 244 url_fetchers_.find(const_cast<net::URLFetcher*>(source)); |
245 if (it == url_fetchers_.end()) { | 245 if (it == url_fetchers_.end()) { |
246 // Looks like crash on Mac is possibly caused with callback entering here | 246 // Looks like crash on Mac is possibly caused with callback entering here |
247 // with unknown fetcher when network is refreshed. | 247 // with unknown fetcher when network is refreshed. |
248 return; | 248 return; |
249 } | 249 } |
250 std::string type_of_request( | 250 std::string type_of_request( |
251 it->second.request_type == AutofillDownloadManager::REQUEST_QUERY ? | 251 it->second.request_type == AutofillDownloadManager::REQUEST_QUERY ? |
252 "query" : "upload"); | 252 "query" : "upload"); |
253 const int kHttpResponseOk = 200; | 253 const int kHttpResponseOk = 200; |
254 const int kHttpInternalServerError = 500; | 254 const int kHttpInternalServerError = 500; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 SetPositiveUploadRate(new_positive_upload_rate); | 309 SetPositiveUploadRate(new_positive_upload_rate); |
310 SetNegativeUploadRate(new_negative_upload_rate); | 310 SetNegativeUploadRate(new_negative_upload_rate); |
311 } | 311 } |
312 | 312 |
313 observer_->OnUploadedPossibleFieldTypes(); | 313 observer_->OnUploadedPossibleFieldTypes(); |
314 } | 314 } |
315 } | 315 } |
316 delete it->first; | 316 delete it->first; |
317 url_fetchers_.erase(it); | 317 url_fetchers_.erase(it); |
318 } | 318 } |
OLD | NEW |