Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: chrome/browser/autofill/autofill_download.cc

Issue 10386063: Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, fix win component build Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/autofill/autofill_download.h ('k') | chrome/browser/chrome_to_mobile_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_download.h ('k') | chrome/browser/chrome_to_mobile_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698