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

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

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years 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) 2010 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/autocomplete.h" 5 #include "chrome/browser/autocomplete/autocomplete.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // If the user typed a scheme, and it's HTTP or HTTPS, we know how to parse it 142 // If the user typed a scheme, and it's HTTP or HTTPS, we know how to parse it
143 // well enough that we can fall through to the heuristics below. If it's 143 // well enough that we can fall through to the heuristics below. If it's
144 // something else, we can just determine our action based on what we do with 144 // something else, we can just determine our action based on what we do with
145 // any input of this scheme. In theory we could do better with some schemes 145 // any input of this scheme. In theory we could do better with some schemes
146 // (e.g. "ftp" or "view-source") but I'll wait to spend the effort on that 146 // (e.g. "ftp" or "view-source") but I'll wait to spend the effort on that
147 // until I run into some cases that really need it. 147 // until I run into some cases that really need it.
148 if (parts->scheme.is_nonempty() && 148 if (parts->scheme.is_nonempty() &&
149 (parsed_scheme != L"http") && (parsed_scheme != L"https")) { 149 (parsed_scheme != L"http") && (parsed_scheme != L"https")) {
150 // See if we know how to handle the URL internally. 150 // See if we know how to handle the URL internally.
151 if (URLRequest::IsHandledProtocol(WideToASCII(parsed_scheme))) 151 if (net::URLRequest::IsHandledProtocol(WideToASCII(parsed_scheme)))
152 return URL; 152 return URL;
153 153
154 // There are also some schemes that we convert to other things before they 154 // There are also some schemes that we convert to other things before they
155 // reach the renderer or else the renderer handles internally without 155 // reach the renderer or else the renderer handles internally without
156 // reaching the URLRequest logic. We thus won't catch these above, but we 156 // reaching the net::URLRequest logic. We thus won't catch these above, but
157 // should still claim to handle them. 157 // we should still claim to handle them.
158 if (LowerCaseEqualsASCII(parsed_scheme, chrome::kViewSourceScheme) || 158 if (LowerCaseEqualsASCII(parsed_scheme, chrome::kViewSourceScheme) ||
159 LowerCaseEqualsASCII(parsed_scheme, chrome::kJavaScriptScheme) || 159 LowerCaseEqualsASCII(parsed_scheme, chrome::kJavaScriptScheme) ||
160 LowerCaseEqualsASCII(parsed_scheme, chrome::kDataScheme)) 160 LowerCaseEqualsASCII(parsed_scheme, chrome::kDataScheme))
161 return URL; 161 return URL;
162 162
163 // Finally, check and see if the user has explicitly opened this scheme as 163 // Finally, check and see if the user has explicitly opened this scheme as
164 // a URL before. We need to do this last because some schemes may be in 164 // a URL before. We need to do this last because some schemes may be in
165 // here as "blocked" (e.g. "javascript") because we don't want pages to open 165 // here as "blocked" (e.g. "javascript") because we don't want pages to open
166 // them, but users still can. 166 // them, but users still can.
167 // TODO(viettrungluu): get rid of conversion. 167 // TODO(viettrungluu): get rid of conversion.
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 void AutocompleteController::CheckIfDone() { 949 void AutocompleteController::CheckIfDone() {
950 for (ACProviders::const_iterator i(providers_.begin()); i != providers_.end(); 950 for (ACProviders::const_iterator i(providers_.begin()); i != providers_.end();
951 ++i) { 951 ++i) {
952 if (!(*i)->done()) { 952 if (!(*i)->done()) {
953 done_ = false; 953 done_ = false;
954 return; 954 return;
955 } 955 }
956 } 956 }
957 done_ = true; 957 done_ = true;
958 } 958 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698