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

Side by Side Diff: chrome/browser/autocomplete/search_provider.cc

Issue 6166010: net: Remove typedef net::URLRequestStatus URLRequestStatus; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
OLDNEW
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 #include "chrome/browser/autocomplete/search_provider.h" 5 #include "chrome/browser/autocomplete/search_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 221 }
222 222
223 void SearchProvider::Stop() { 223 void SearchProvider::Stop() {
224 StopSuggest(); 224 StopSuggest();
225 done_ = true; 225 done_ = true;
226 default_provider_suggest_text_.clear(); 226 default_provider_suggest_text_.clear();
227 } 227 }
228 228
229 void SearchProvider::OnURLFetchComplete(const URLFetcher* source, 229 void SearchProvider::OnURLFetchComplete(const URLFetcher* source,
230 const GURL& url, 230 const GURL& url,
231 const URLRequestStatus& status, 231 const net::URLRequestStatus& status,
232 int response_code, 232 int response_code,
233 const ResponseCookies& cookie, 233 const ResponseCookies& cookie,
234 const std::string& data) { 234 const std::string& data) {
235 DCHECK(!done_); 235 DCHECK(!done_);
236 suggest_results_pending_--; 236 suggest_results_pending_--;
237 DCHECK_GE(suggest_results_pending_, 0); // Should never go negative. 237 DCHECK_GE(suggest_results_pending_, 0); // Should never go negative.
238 const net::HttpResponseHeaders* const response_headers = 238 const net::HttpResponseHeaders* const response_headers =
239 source->response_headers(); 239 source->response_headers();
240 std::string json_data(data); 240 std::string json_data(data);
241 // JSON is supposed to be UTF-8, but some suggest service providers send JSON 241 // JSON is supposed to be UTF-8, but some suggest service providers send JSON
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 match.description_class.push_back( 877 match.description_class.push_back(
878 ACMatchClassification(0, ACMatchClassification::DIM)); 878 ACMatchClassification(0, ACMatchClassification::DIM));
879 // Only the first search match gets a description. 879 // Only the first search match gets a description.
880 return; 880 return;
881 881
882 default: 882 default:
883 break; 883 break;
884 } 884 }
885 } 885 }
886 } 886 }
OLDNEW
« no previous file with comments | « chrome/browser/alternate_nav_url_fetcher.cc ('k') | chrome/browser/autocomplete/search_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698